Auth with github will ask to validate email?

(Ionuț Staicu) #1

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.


(Rafael dos Santos Silva) #2

Is your email verified on Github?

(Ionuț Staicu) #3

Yes, both emails are confirmed.

(Rafael dos Santos Silva) #4

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?

(Sam Saffron) #5

Hmm … what fork?

(Rafael dos Santos Silva) #6

Oops, so we wen’t back already.

So it’s a matter of using primary_email now?

(Sam Saffron) #7

@Falco maybe, need more details.

@iamntz Do you have multiple emails going in?

(Joe) #8

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.

(Ionuț Staicu) #9

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.

(Vinoth Kannan) #10

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

(Sam Saffron) #11

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

(Vinoth Kannan) #12

Yes. I am already debugging it :+1:

(Vinoth Kannan) #16

PR created FIX: GitHub auth always asking to verify email for new users by vinothkannans · Pull Request #5487 · discourse/discourse · GitHub

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