AlanSTACK
AlanSTACK

Reputation: 6065

How to force google to allow user to choose accounts during oauth?

Im currently trying to integrate some support for google apps (e.g. use your google calendar while on this website, etc) - and Im currently trying to do it with their api via oauth2

https://developers.google.com/api-client-library/python/guide/aaa_oauth

Unfortunately, a weird quirk is that, google automatically tries to authenticate oauth2 with the user's currently signed in account. Is it possible to force google to allow users to pick an account by specifying some sort of query parameter in step1_get_authorize_url()?

Like this enter image description here

Upvotes: 1

Views: 1471

Answers (1)

Bravin Balasubramaniam
Bravin Balasubramaniam

Reputation: 494

The following parameter is supported in OAuth2 authorization URLs:

prompt

Currently it can have values 'none', 'select_account', and 'consent'.

select_account: Will cause the account selector to display, even if there's a single logged-in user, just as you asked.

prompt=select_account

Upvotes: 3

Related Questions