Fix Keycloak logout confirmation and stale logged-in avatar after token refresh fails - #436
Open
UdayRajSahai2 wants to merge 1 commit into
Open
Fix Keycloak logout confirmation and stale logged-in avatar after token refresh fails#436UdayRajSahai2 wants to merge 1 commit into
UdayRajSahai2 wants to merge 1 commit into
Conversation
…s logged in user even when it was not logged in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue : This logout page does not make sense as we are not giving any option other than logging out
On Logout:
Still logged in: tell Keycloak to log out in the background, then go to login. Do not show the logout page.
Already expired: skip Keycloak. Go straight to login.
Users should never see the Keycloak logout page.
2.After RefreshAccessTokenError, NextAuth still kept session.user, so the homepage avatar sometimes looked logged in. SessionGuard now signOuts to clear that dead session. Dashboard still redirects to Keycloak login, same as before.