-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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(cli): add browser logout step #20502
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
0c5c9e7
to
5c85e7b
Compare
5c85e7b
to
5ab96e2
Compare
logger.error( | ||
"🥲 Oops! Couldn't retrieve the cloud CLI config from the server. Please try again." | ||
); | ||
|
||
throw error; |
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.
wouldn't this log two errors in the user's terminal if the action is try..catching this ?
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.
Yes, it could output something like:
- "🥲 Oops! Couldn't retrieve the cloud CLI config from the server. Please try again."
- "Login action failed."
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.
Could we only have one log for UX ?
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.
Sure, if it's too much details for the error
log level (or if we have a "one error line max per command" rule), I'll output it to debug
instead
e473ff4
to
566f159
Compare
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.
lgtm
566f159
to
0f1a5a0
Compare
0f1a5a0
to
c17aadf
Compare
was missing for staging environment. Had it in base url during local dev.
What does it do?
We perform a proper OIDC logout by opening the logout endpoint in the browser. We provide the client ID and token. We do nothing if an error happens during the logout process: the logout happens at least on the app level, this just adds a logout on the Auth0 SSO level.
"chore" changes (unrelated to the initial task):
Why is it needed?
This change is needed to address the issue where users are unable to switch between different login providers. By logging out the user from the OIDC provider, the user's session is cleared. This allows the user to choose a different login provider when they attempt to log in again.
How to test it?
First, use the login command:
Log in in the CLI using one of the login providers (e.g., Google),
Then, log out (using the logout command):
The CLI should open the OIDC provider's logout URL in a browser.
Try to log in again. You should be able to choose a different login provider.