openidgoogle-oauthgoogle-openid

Google OpenID force user account selection (like google oauth's login_hint param)


I am currently implementing an interface that knows the email of the user before the user has logged in. Preferably, since I'm only using this for authentication I'd like to use OpenID as opposed to OAuth2. However, if the user is logged in to multiple Google accounts then the user is forced to select from those accounts. I'd prefer it if I could tell Google that I wanted a specific Google Account to be logged in so the user does not have to guess which account I'm looking for (given that they're logged in to that account). This is completely for better UX.

I know that with Google's OAuth2 I can simply specify a login_hint which will skip the account selection screen if the user is logged in to the account specified in the login_hint parameter. For reference, https://developers.google.com/accounts/docs/OAuth2Login

Does anyone know of something similar for OpenID? I've read google's documentation and it seems like it's not possible, but perhaps I'm missing something. Any help would be appreciated!


Solution

  • Unfortunately, OpenId doesn't support login hint feature.

    I would recommend you use OAuth2 if possible, given that OAuth2 can also be used for authentication only.