FusionAuth / fusionauth-issues

FusionAuth issue submission project
https://fusionauth.io
90 stars 12 forks source link

Same account selected in Google Idp after logging out #2145

Open jaywood128 opened 1 year ago

jaywood128 commented 1 year ago

Same account selected in Google Idp after logging out

Problem

  1. A user clicks the Login with Google button to initiate auth using FusionAuth's Google Idp.
  2. They are prompted to select one of their accounts, as documented here: https://fusionauth.io/docs/v1/tech/identity-providers/google#custom-parameters
  3. They log out of the FusionAuth application.
  4. When logging in with Google again, the previous account selected on the first login is automatically selected. This is possibly related to the fact that logging out of FusionAuth does not end the Google session.

Solution

Ideally, the user should be able to select which of their Google accounts each time they log in.

Alternatives/workarounds

After logging out of the FusionAuth application make an additional call to https://accounts.google.com/logout. re: https://stackoverflow.com/questions/58154256/aws-cognito-how-to-force-select-account-when-signing-in-with-google

You can also use the OIDC provider and pass the prompt=select_account paramater. More here: https://fusionauth.io/docs/v1/tech/identity-providers/google#custom-parameters

Related issues:

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

theogravity commented 2 weeks ago

You do not want to do a call to https://accounts.google.com/logout because it will sign you out of all your google accounts, meaning you have to sign in again. While this is technically a solution as it will show the account selector, it adds more friction as the user now has to sign back into their google accounts.