-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Github user with multiple emails + emails file #401
Comments
It looks like the permitted email address must be the primary email address for the github account. https://github.com/bitly/oauth2_proxy/blob/master/providers/github.go#L230 |
Ahh I wasn't aware of that. Is that standardized by Oauth or would it be worth looking into adding a config option to auth with non-primary emails? |
No, this is just due to the interface oauth2_proxy requires of the various "providers" (in this codebase). It could theoretically be expanded. |
I would like to have this work with multiple email accounts as most company employees want to keep their personal email address as the primary for their GitHub account. |
First off, this proxy is a slick piece of work. I am having the exact same problem with GitHub. I once wrote an auth layer similar to this, and I had to do exactly what @danielunderwood is suggesting: Go through all of the returned emails associated with the person since the permitted domain might not be the primary one. (Also, I am not sure that GitHub has a notion of a "primary" -- the assumption seems to be that they are all equal.) Here's what I did: https://github.com/jgn/stoor/blob/master/lib/stoor/github_auth.rb#L40 |
It seems to me that oauth2_proxy should be checking github's
I'd suggest that using https://github.com/bitly/oauth2_proxy/blob/master/providers/github.go#L246 |
Fyi: there is an active discussion about forking this (obviously unmaintained) project here: #628 |
I'm using a setup with github auth and authenticated-emails-file to permit users based on email. One of my users has multiple emails on his github account and is denied access even though one of them is in the authenticated emails file. If he removed the email associated with his account that is not in the file, he able to gain access.
Is there a way around this other than putting the users in an organization/team or putting all emails in the file? Is this expected behavior? I looked around and couldn't find too much information in this direction.
The text was updated successfully, but these errors were encountered: