-
Notifications
You must be signed in to change notification settings - Fork 54
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 is nil when authenticating using github app credentials #41
Comments
Upping this. I am following "The Complete Elixir and Phoenix Bootcamp" on Udemy and currently I can't proceed with the development, getting "Unable to access the user's email address" error with every attempt to log in. |
Added an option to fix the issue in #42 |
@moroz I also run into this issue while following "The Complete Elixir and Phoenix Bootcamp". I solved this by setting explicit default scopes in config.ex. Also I used the version 0.7 instead of the old 0.4 used in this guide.
|
@sbruhns That did not do the trick for me. |
Make sure your Github email address is set to public (if it's private, you'll continue to see an error message). |
I don't have control over what other people decide to set as public/private when they try to login to my site using their github login! |
@antonydenyer - Adding config :ueberauth, Ueberauth,
providers: [
github: { Ueberauth.Strategy.Github, [default_scope: "user,user:email,public_repo"]}
] Note that the oauth page will specify you are asking for access to all their private email addresses. I think this solution is helpful for the elixir bootcamp, but is too heavy handed for production apps. |
Thanks @schtauffen are you creating a github app or an oauth app? |
I am just using github for oauth (following the elixir bootcamp guide). |
just thanking @schtauffen and @sbruhns for saving my butt years later |
I second the above ^ from feitelogram. Thank you guys. How did you figure that out though? |
Got stuck here folks...did everything as @schtauffen and @sbruhns mentioned... any help? 😞 edit: giving up and using public email... (as much as i hate it) edit 2: while creating the app, ensure that you choose email as read-only under and config :ueberauth, Ueberauth,
providers: [
github: { Ueberauth.Strategy.Github, [default_scope: "user:email"]}
] |
If you are using credentials for a github app you may not have access to the user's email address. Scopes are redundant as they are defined in your application settings as opposed to the oauth request.
identifying-users-on-your-site
What are the options we have here? Have an additional config setting to allow nil?
The text was updated successfully, but these errors were encountered: