-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub SSO returns null email if in GitHub's profile the email is private #54
Comments
PR #55 |
supersedes GitHub SSO returns null email if in GitHub's profile the email is private #54
@Cereal84 I know it took long, but in the end I found out there was actually a bug in my passing the session on to I have to close #69, though. I will mention you in the release at least, I am so sorry for how I resolved this in the end. |
@tomasvotava Don't worry, the important thing is to have resolved it :). I hope you have a nice day. |
If the user has set the email as private in its GitHub profile than the GitHub SSO class returns an empty email.
In order to retrieve the email even if it is private the class need to use 'https://api.github.com/user/emails"' endpoint.
That endpoint returns a list of email like
[ { "email": "octocat@github.com", "primary": true, "verified": true, "visibility": "private" }, { "email": "xxxxx@github.com", "primary": false, "verified": true, "visibility": "private" }, ]
we're interested in the one with 'primary: true' value.
The text was updated successfully, but these errors were encountered: