I'm currently using Cognito User Pools, federated with Google as an identity provider, to handle user sign in for my web app. At the moment, I have only implemented Sign-In with Google. This is currently being done through Cognito's Hosted UI.
When users sign in with Google, I'd like them to always be prompted to select their account, i.e. be presented with this prompt.
However, I have found that when I'm logged in with only one Google account, then this screen is skipped. Although, when I'm logged into no Google account / 2 or more Google accounts, this screen is shown.
Things I've tried to make this screen always show up:
- Using AWS Amplify's
federatedSignIn({provider: 'Google'})
function. However, I found that this is just a wrapper on Cognito's Hosted UI and just redirects to the same authorization endpoint, as described here.
- Adding
prompt=select_account
to the authorization endpoint as detailed in Google's documentation, however this had no effect. This was unsurprising as the prompt
option is not detailed in the AWS documentation for the authorization endpoint.
If anyone has any ideas on how I can always have this account selection screen shown, it would be very much appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…