Next-auth: [v2] Server And Client Stops And Throws Error When GitHub Does Not Send Email ID

Created on 21 May 2020  路  4Comments  路  Source: nextauthjs/next-auth

I have privacy enable on github so it does not send email.
gscreenshot_2020-05-22-012245

I get this error and both server and client stops working.

bug

Most helpful comment

hey @iaincollins wanted to also ask about this feature: to be able to sign in with GitHub even if an email is not on the users GitHub public profile. When signing in with GitHub on the next-auth demo (I do not currently have a public email on my GitHub), I was given this message which you merged as part of #152

Sign in with another account
Your account doesn't have an email address (required).

Try signing in with a different account.

I know this is how you are handling it in the short term but I am thinking of using next-auth with GitHub for my primary auth provider and want to see if there were further plans to try and remedy this issue for people who do not have public emails on their GitHub profile. I think this would be kind of a bigger deal for my use case as for now I am only planning on using GitHub as auth strategy.

All 4 comments

You can check out #131. We currently don't support signing up without email address but we're looking into supporting this.

It would be better if the user get some response .instead of an error

Absolutely!

The plan for launch is to require an email address - as there are a few considerations that arise from not doing that and I'd rather not worry about them all now - but it should definitely be handled gracefully, and just ask the user for an email address (and not error).

This should be fixed soon.

hey @iaincollins wanted to also ask about this feature: to be able to sign in with GitHub even if an email is not on the users GitHub public profile. When signing in with GitHub on the next-auth demo (I do not currently have a public email on my GitHub), I was given this message which you merged as part of #152

Sign in with another account
Your account doesn't have an email address (required).

Try signing in with a different account.

I know this is how you are handling it in the short term but I am thinking of using next-auth with GitHub for my primary auth provider and want to see if there were further plans to try and remedy this issue for people who do not have public emails on their GitHub profile. I think this would be kind of a bigger deal for my use case as for now I am only planning on using GitHub as auth strategy.

Was this page helpful?
0 / 5 - 0 ratings