-
Notifications
You must be signed in to change notification settings - Fork 273
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
feat: add method handleLoginRedirect #528
Conversation
CHANGELOG.md
Outdated
@@ -21,13 +21,15 @@ | |||
- `sdk.setFromUri` | |||
- `sdk.getFromUri` | |||
- `sdk.removeFromUri` | |||
- `sdk.handlePostLoginRedirect` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can name this handleLoginRedirect
which matches better with isLoginRedirect
. Also is isLoginRedirect
being hoisted out of the token
namespace? Either isLoginRedirect
should be hoisted up, or handleLoginRedirect
should be put inside the token
namespace, because these 2 methods belong together.
README.md
Outdated
@@ -491,6 +491,25 @@ oktaAuth.authStateManager.subscribe(authState => { | |||
oktaAuth.authStateManager.updateAuthState(); | |||
``` | |||
|
|||
##### `onPostLoginRedirect` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is related to the fromUri
concept. It would be nice if the naming matched for these methods. Currently we have:
- setFromUri
- getFromUri
- removeFromUri
Rather than being an event hook (onX), this method would make more sense as something that DOES something, like "restoreFromUri", but I think I don't really like the "from". From WHAT? Maybe we can find a better name for the core concept then have get/set/remove/restore around that concept.
The URI is where you were navigating to before you were interrupted for an auth flow. When the auth flow completes you would like to continue on to that original/intended URI. Maybe originalUri
or intendedUri
? or pendingUri
?
restorePendingUri
or redirectToPendingUri
sounds OK. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel originalUri
makes sense in the context. Changed related methods/docs accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, "restore original" makes sense to me
08e0390
to
59c7958
Compare
Codecov Report
@@ Coverage Diff @@
## master #528 +/- ##
==========================================
+ Coverage 91.28% 91.45% +0.17%
==========================================
Files 32 32
Lines 1847 1885 +38
Branches 412 422 +10
==========================================
+ Hits 1686 1724 +38
Misses 161 161
Continue to review full report at Codecov.
|
base pattern for renewTokensWithRefresh renew successfully (once) Fixed renewal with refresh token Adds base revoke for refresh tokens Updates existing tests to pass updates docs a bit feat: add method handleLoginRedirect (#528) accept responseType as a constructor arg (#525) add methods: isPKCE, hasResponseType update samples to use authStateManager (#506) revised to try for non-breaking Fix for lack of AuthState Fix return val for renewTokens Fix responseType on renew error Fix urls passed for renew Run e2e tests w/o refresh token for now prep for 4.2.0 release OKTA-330344 <<<Jenkins Check-In of Tested SHA: 8f7dfb6 for eng_productivity_ci_bot_okta@okta.com>>> Artifact: okta-auth-js
No description provided.