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

Email without scope #69

Merged
merged 1 commit into from
Feb 12, 2017
Merged

Conversation

almirsarajcic
Copy link
Contributor

@almirsarajcic almirsarajcic commented Feb 11, 2017

Fixes #68.

Without scope email is nil even though it's available in raw_info.

#<OmniAuth::AuthHash ... raw_info=#<OmniAuth::AuthHash ... email="almir.sarajcic@icloud.com" ...> info=#<OmniAuth::AuthHash::InfoHash email=nil ...> ...>

The cause is it's using primary_email directly.

This PR makes it use existing method email which checks if email is allowed and if so it uses primary_email. Otherwise, it uses email from raw_info.

@tmilewski tmilewski merged commit 1c57c79 into omniauth:master Feb 12, 2017
@almirsarajcic almirsarajcic deleted the bug-fixes/email-nil branch February 12, 2017 15:06
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

Successfully merging this pull request may close these issues.

2 participants