Parse-server: Logging in using Facebook and it sends email verification

Created on 7 Sep 2016  Â·  18Comments  Â·  Source: parse-community/parse-server

My app hosted on NodeChef allows users to log in using Facebook through Parse however it sends a verification email with a link that does not work. Firstly, it should not be sending a verification email as they have logged in using Facebook. Can you please explain why this happens?

  • Server
    NodeChef
  • Database
    MongoDB on NodeChef
bug enhancement

All 18 comments

That looks like a bug, is the email field set on your user?

Hi, yes, the email field is set because I retrieve the email from Facebook and save it into that field when the user first logs on using Facebook option.

I'll have a look

Hi, any luck so far with this issue? Thanks.

Nope, I didn't get the chance to look at it or fix it. You can submit a pull request with the fix if that's a pressing matter

Hi, unfortunately, I don't have the expertise to fix the issue. It's not a pressing matter but rather something that should be fixed when possible. Thanks.

I got this issue too

Seems it sends two emails each time when logged in with Facebook. The emailVerified filed is set to true when the link in the later verification email is clicked. When logout, the emailVerified remains true. Login again, the emailVerified is set to false, and emails are sent again.

I get something similar. I get one email every time I open the application. To be precise not every time, only if app opens are an hour apart.

Actually that was my mistake I was updating the user every time that app was restarting with new data from Facebook without checking out if the data are the same.

Same issue for 2.3.6

This was never fixed.

I have a similar issue/question. I want to avoid email confirmation when users logs in with facebook, since facebook already verified their email. Is there a way to achieve this?

Please can you estimate a date for the fix? I need to evaluate if I have to find a workaround. Thank you very much!

Does anyone know if we can set the user's "emailVerified" flag to "true" if they log in with oauth?

I'm authenticating with Account Kit (mobile phone), and I think this fix inadvertently makes it impossible to verify the email that the user enters manually.

I've currently hacked it by changing line 459 in RestWrite.js to:

if (!_this8.data.authData || !Object.keys(_this8.data.authData).length || Object.keys(_this8.data.authData).length === 1 && (Object.keys(_this8.data.authData)[0] === 'anonymous' || Object.keys(_this8.data.authData)[0] === 'accountkit')) {

... but it's not exactly beautiful.

We should probably add a method on the auth adapters as originally, someone who used the Facebook login didn’t want email verification to be sent. We probably need to check if the password is set alongside the email to trigger the verification and remove that ‘not so sexy’ logic.

What do you think?

@madsb can you open a new issue so we can keep track of the problem as this original one has been closed! (and you actually want a different behaviour, the opposite one).

Was this page helpful?
0 / 5 - 0 ratings