Skip to content
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

Closed
Cereal84 opened this issue Sep 17, 2023 · 3 comments
Closed

Comments

@Cereal84
Copy link
Contributor

Cereal84 commented Sep 17, 2023

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.

@Cereal84
Copy link
Contributor Author

PR #55

tomasvotava added a commit that referenced this issue Nov 24, 2023
supersedes GitHub SSO returns null email if in GitHub's profile the email is private  #54
@tomasvotava
Copy link
Owner

@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 openid_from_response method 🤦 the session was not only closed but it also wasn't authenticated properly. It should be working now, I will release 0.9.0 ASAP.

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.

@Cereal84
Copy link
Contributor Author

@tomasvotava Don't worry, the important thing is to have resolved it :).

I hope you have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants