Skip to content

feat(ui): make SSO re-authentication optional on logout #412

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

glasstiger
Copy link
Contributor

@glasstiger glasstiger commented Apr 2, 2025

Currently the web console forces the user to re-authenticate with the OAuth2/OIDC provider after logout by sending the query param prompt=login on the authorization code request.

Logout can be initiated in a number of ways:

  • by pressing the Logout button
  • by not having a refresh token when the access token expires
  • by various authentication related issues

In most cases the user has a valid session with the OAuth2/OIDC provider, which means that the provider is able to issue an authorization code without the need for the user typing their password in again.
Therefore the query param prompt=login should be optional on logout, and should be sent only when required.
This includes scenarios when:

  • the user logs out to change to another SSO user account
  • authentication attempt was unsuccessful, such as the state parameter does not match or missing

However, in scenarios when the user would logout only to switch to a database user, such as built-in admin, do something, and change back to their SSO user, we should not send prompt=login.
Now the Login screen will give the option to the user to continue with the currently logged in OAuth2 user, or switch to a different account.

@glasstiger glasstiger marked this pull request as draft April 2, 2025 01:27
@glasstiger glasstiger marked this pull request as ready for review April 2, 2025 01:42
@emrberk
Copy link
Contributor

emrberk commented Apr 7, 2025

Hi @glasstiger,

I think having Logout and SSO Logout at the same time is misleading, and not clear at first glance:

Screenshot 2025-04-07 at 18 31 44

I think we can resolve this issue by storing the SSO user name alongside with SSO information, and having two states:

  • When we already have a SSO session for a user "Emre":
Screenshot 2025-04-07 at 17 46 41
  • When we don't have any information for SSO users:
Screenshot 2025-04-07 at 17 47 19

WDYT?

@glasstiger
Copy link
Contributor Author

Hi @glasstiger,

I think having Logout and SSO Logout at the same time is misleading, and not clear at first glance

Yes, UX would have needed more work for sure.

I have merged your changes from #416 into this PR now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants