svs / covid19-supply-chain-backend

2 stars 6 forks source link

[OAuth Twitter] User not saved when `auth.info.email` is nil #11

Closed anew-bhav closed 4 years ago

anew-bhav commented 4 years ago

There can be cases where the auth object does not contain email address because the user has disabled sharing the email( or other reason ) I have tested this with my twitter account where the app.info.email was coming out to be nil, so authentication worked, but no info was saved in the database @BilalBudhani We have to ensure that if the email is not present then we have a fallback

anew-bhav commented 4 years ago

Turned out the API keys I was using, didn't ask permission from user to share the email, hence email was not included in the response. image also the option to request email address from user is not clickable Conclusion: false negative

BilalBudhani commented 4 years ago

@anubhav8421 Yes, email permission has to be enabled in the Twitter app settings.

BilalBudhani commented 4 years ago

@anubhav8421 Can you close this issue if you've received a satisfactory response?