BlitzKraft / saythanks.io

Spreading Thankfulness in Open Source.
https://saythanks.io
1.25k stars 154 forks source link

Facebook authentication fails #106

Open kgashok opened 2 years ago

kgashok commented 2 years ago

When trying to authenticate using Facebook, this error shows up

image

...and then the following fail screen is as below:

image

kgashok commented 2 years ago

https://stackoverflow.com/questions/37063685/facebook-oauth-the-domain-of-this-url-isnt-included-in-the-apps-domain - might provide some answers.

DeepakChakravarthy commented 2 years ago

I Would Like to Work on this Issue sir and get More Explored in the Configuration of Oauth with Facebook Authentication

tushar5526 commented 1 year ago

This is because we are trying to access email from user_info dictionary after authorization, but there is no email present in the dictionary. Work around would be to redirect to a page where we have a prompty to enter email.

https://community.auth0.com/t/auth0-facebook-login-email-issue-2/21408/8

I don't think there is any solid fix for it. We can skip the email or ask the users their email.

cc @kgashok @Pavithratrdev

tushar5526 commented 1 year ago

In the maintainer meet we discussed, setting up a new prompt to ask for email is not a good option because in OAuth2, auth providers has the responsibility of sending verified data if the user allows.

I will look for other alternatives to Auth0 in the mean time and share them here.

cc @kgashok @Pavithratrdev

kgashok commented 1 year ago

A lot of users have started using patreon (https://www.patreon.com/) as well. FWIW,

tushar5526 commented 1 year ago

I tried different ways to hit the graph API using access tokens and get the email of a user, but some users' profiles just don't have any email associated with them. Either their emails are not verified or they used a mobile number to log in, but Facebook is not sending anything back.

I don't think switching to other providers will solve this issue, I am thinking of either redirecting the user to a new prompt for email input or just assigning a random email value to the user something like "user+(time)@facebook.com". The cons of the second approach are that the user will not get an email notification. Let me know your thoughts on this.

I will take a look at whether Auth0 has inbuilt support for Patreon.

@Pavithratrdev @kgashok

kgashok commented 1 year ago

@tushar5526 @Pavithratrdev How about integration with Mastodon?

https://blog.medium.com/medium-embraces-mastodon-19dcb873eb11