-
Notifications
You must be signed in to change notification settings - Fork 257
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 clearTokensAfterRedirect option to signOut - OKTA-443730 #1010
Conversation
lib/OktaAuth.ts
Outdated
@@ -445,6 +461,28 @@ class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI { | |||
return logoutUri; | |||
} | |||
|
|||
async signOutSSO(options: SignoutOptions) { | |||
var postLogoutRedirectUri = options.postLogoutRedirectUri |
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.
should we verify there is an active session (a valid login) before attempting to signOut?
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.
It's handled by the /logout
endpoint. Also, I would prefer to leave this check to the devs side, since it most probably will need to trigger a network request.
If no Okta session exists, this endpoint has no effect and the browser is redirected immediately to the Okta sign-in page or the post_logout_redirect_uri (if specified).
Codecov Report
@@ Coverage Diff @@
## master #1010 +/- ##
==========================================
+ Coverage 92.48% 92.51% +0.03%
==========================================
Files 134 134
Lines 3697 3712 +15
Branches 772 775 +3
==========================================
+ Hits 3419 3434 +15
Misses 278 278
Continue to review full report at Codecov.
|
cbca6a8
to
b694c15
Compare
85d8b86
to
ed6e3ab
Compare
OKTA-443730 <<<Jenkins Check-In of Tested SHA: b780721 for eng_productivity_ci_bot_okta@okta.com>>> Artifact: okta-auth-js Files changed count: 18 PR Link: "#1010"
In this PR:
clearTokensAfterRedirect
option to the signOut method