bitly / oauth2_proxy

A reverse proxy that provides authentication with Google, Github or other provider
MIT License
5.1k stars 1.21k forks source link

Google auth breaks if user has several emails #639

Open jehy opened 5 years ago

jehy commented 5 years ago

Seems like an important bug, but I haven't found any mentions of this.

When I use one google account, everything is fine. But when i connect several accounts, I often have to relogin. Seems like data from another account is sometimes used for validation (may be account is selected randomly ot last used account is used), of cause it does not pass validation and asks user to relogin. That's really painful.

roman-vynar commented 5 years ago

You can filter out the list to a single domain, e.g.

login_url = "https://accounts.google.com/o/oauth2/auth?access_type=online&hd=mydomain.com"