Auth with github will ask to validate email?

Hey guys!

I’ve received a complain from a new user that auth with github will ask for email confirmation. Tested and indeed it does!

I’m doing something wrong or is just a bug somewhere?

On the other hand, FB auth works just fine.

Thanks!

1 Like

Is your email verified on Github?

Yes, both emails are confirmed.

Hmmm @sam we are using a fork of GitHub - omniauth/omniauth-github: GitHub strategy for OmniAuth since 2014 because they were returning unverified emails.

Looks like they fixed this in 2015. Should we go back to the official library?

5 Likes

Hmm … what fork?

3 Likes

Oops, so we wen’t back already.

So it’s a matter of using primary_email now?

2 Likes

@Falco maybe, need more details.

@iamntz Do you have multiple emails going in?

https://github.com/settings/emails

3 Likes

A few days ago I signed up for an account in a Discourse community that has Github login.

I only have one email on Github and it’s verified.

I still needed to go through email verification on Discourse.

However, looking at the settings screen, I wonder if setting the email address to private has any effect.

2 Likes

I can’t tell for the other account, but the video above was recorded with a newly created (and verified!) account. So no, that’s only one mail there :slight_smile:

Not sure that’s relevant, because on register, the email is set correctly.

2 Likes

I am able to reproduce it. I have multiple emails. But all verified.

1 Like

Cool, can you help debugging it? is something wrong with the github authenticator in discourse?

Yes. I am already debugging it :+1:

2 Likes

PR created https://github.com/discourse/discourse/pull/5487

Looks like omniauth-github doesn’t have email_verified field at all. Instead it returns primary email field only if it verified.

9 Likes