-
Notifications
You must be signed in to change notification settings - Fork 143
fix: Display error when a user connected with OIDC token from another… #4646
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
base: master
Are you sure you want to change the base?
Conversation
|
Can we add the link to logout directly from the error message? calling /auth/logout is ok? |
I'm not sure, I'll check, it's just an error page, and we can't just add link as text, it will be displayed as is |
|
Thanks. Now, next iteration will be to make a good design for this page 🙄 |
It's just my local run without css, in general it's better |
| if dmErr, ok := err.(*DomainMismatchError); ok { | ||
| extras["ErrorArgs"] = dmErr.TranslationArgs() | ||
| errMsg = dmErr.TranslationKey() | ||
| if logoutURL := getOIDCLogoutURL(inst.ContextName); logoutURL != "" { |
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.
logout from OIDC is really the SSO endpoint? So if backchannel logout is not working, we'll not be disconnected from the stack right?
Shouldn't we call internal stack api (something like DELETE /auth or I don't remember) and let this route call SSO endpoint if needed?
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's the SSO endpoint, and in the Twake Workplace case, it'sthe URL in sign-up /oauth/logout.
We'll not be disconnected from the "first" stack, and it's the same problem we were talking about last week
I think no:
- OIDC logout flow should be initiated by RP
- current DELETE /auth/login doesn't call
end_session_edpointand even if we call DELETE/auth/register/, only a specific session will be destroyed, and the user will stay logged in, in our case we want the user to be disconnected from SSO completely
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.
OK it makes sense (thanks!).
We need to work on "be sure to be logout from the stack" if we're not connected to the sso (by making the stack more consistent with the sso provider)
a8a5c04 to
fb99f69
Compare
Improve OIDC error message when user has an active session for different account
When users try to login to one Twake instance while having an active OIDC session for a different instance, they now see a helpful message, "To connect to X, please disconnect first from Y" instead of the generic "The authentication has failed". This helps users understand why login failed and what action to take.