Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(typescript): migrate BaseAuthenticator and OAuthPasswordGrant #2883

Merged
merged 8 commits into from
Dec 27, 2024

Conversation

BobrImperator
Copy link
Collaborator

@BobrImperator BobrImperator commented Dec 26, 2024

  • Refactors BaseAuthenticator and OAuth2PasswordGrantAuthenticator to typescript
  • Adds typed-event-target as devDependency to allow typing CustomEvents emmited by authenticators.
  • Removes a bunch of isEmpty calls from the authenticators and relies on native mechanisms instead.
  • Deprecates responseText and responseJSON returned by the OAuth2PasswordGrantAuthenticator.
  • Bumps torii deprecation to 8.0.0

@BobrImperator BobrImperator changed the title Migrate authenticators typescript refactor(typescript): migrate BaseAuthenticator and OAuthPasswordGrant Dec 26, 2024
@BobrImperator BobrImperator force-pushed the migrate-authenticators-typescript branch from 58d499e to 93910de Compare December 27, 2024 00:47
Copy link

github-actions bot commented Dec 27, 2024

Some tests with 'continue-on-error: true' have failed:

  • classic-test-app test:one ember-beta

  • test-app test:one ember-beta

  • classic-test-app test:one ember-canary

  • test-app test:one ember-canary

    Created by continue-on-error-comment

@BobrImperator BobrImperator merged commit 8fd4fff into master Dec 27, 2024
42 of 48 checks passed
@BobrImperator BobrImperator deleted the migrate-authenticators-typescript branch December 27, 2024 01:17
@github-actions github-actions bot mentioned this pull request Dec 28, 2024
@BoussonKarel
Copy link

What are the alternatives for reponseJSON and reponseText? I use these to show the error returned by the backend on login and since the response you return has already been read, it's not an option to use that one.\

Is there any chance you could return a copy of the response (before it was read)? (or copy the response, read that one and send the original)

@BobrImperator
Copy link
Collaborator Author

Hi @BoussonKarel. As you've noticed, there's no clear migration path from these properties which was an oversight.
I've taken a look and made an issue along with a draft PR that implements your suggestion see issue and a PR.

I'm not sure if this is the way forward however, I should be able to take a better look later this week to align the password authenticator with other authenticators instead in backwards compatible way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants