-
Notifications
You must be signed in to change notification settings - Fork 896
feat: endpoint to logout app subdomain URLs #5428
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
Conversation
Regarding the frontend, the implementation causes the login screen to flash before redirecting, but I'm unsure how to do it better in xstate. |
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.
good tests 👍
@Kira-Pilot is there a better way to redirect to the page without flashing the login screen for a split second? |
This is blocked while we figure out a better way to avoid the double login page flash. Kira, Joe and I did some research into it in Discord on Friday and we found that the flash is caused by the The fix seems to be adding a new state to the auth state provider called "signedOutNavigatingAway" or something similar and having the |
Closes #4394
Adds a "special" app URL
coder-logout
(which is not a valid app URL so cannot be conflicted by real apps) which will delete the API key from the database and the cookie. Very lenient towards invalid tokens and will delete the cookie and redirect without failing even if it's an invalid token in most cases.Accepts a
redirect_uri
query param which must have a hostname that matches the access URL or any app URL. Defaults to the access URL.E.g.
https://coder-logout.dev.coder.com
would log you out of all app URLs and return you to the login page.TODO: