Skip to content
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

[Task] Confirm the account you want to use when login to a new OAuth client. #484

Open
taorepoara opened this issue Sep 6, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request hacktoberfest

Comments

@taorepoara
Copy link
Member

What should be done

Propose to save many accounts to let the user select the account he want's to use for the current login request.

Technical recommandation

Check if Hydra can manage it.

Is this task linked with any other ?

Can fix this issue lenra-io/backoffice#131

@taorepoara taorepoara added the enhancement New feature or request label Sep 6, 2023
@shiipou shiipou self-assigned this Oct 9, 2023
@shiipou
Copy link
Contributor

shiipou commented Oct 9, 2023

It seems that OIDC allow to add prompt=select_user to the auth url.

Example :

https://auth.lenra.io/oauth2/auth?client_id=a6ea3163-4c22-4dbb-8316-2766ef9dbb14&redirect_uri=https%3A%2F%2Foauthdebugger.com%2Fdebug&scope=app%3Awebsocket&response_type=code&response_mode=form_post&state=2de5rggpxxh&nonce=9861h6x8nue&prompt=select_user

But in that case, Hydra return me this error :

error=invalid_request
error_description=The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Used unknown value '[select_account]' for prompt parameter&state=2de5rggpxxh

I seen in a github thread a way to handle it in a hacky way.

They explain in the thread that they need to refactor a lot of hydra code to implement it. Maybe it will came some day. Maybe not.

The hacky solution is to implement client-side session management and store multiple session tokens for each user account. You can then use these tokens to manage the accounts and allow the user to switch between them.

@taorepoara
Copy link
Member Author

I seen this Hydra discussion: ory/hydra#3119

We can manage the login cookies on the identity provider instead of Hydra so we can manage many accounts. @shiipou you should look at this solution.

@shiipou shiipou transferred this issue from lenra-io/lenra_cli Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
Status: 🟡 Backlog
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants