keppelen / react-facebook-login

A Component React for Facebook Login
1.18k stars 406 forks source link

Facebook login not working Safari "URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings." #333

Open frankydch opened 2 years ago

frankydch commented 2 years ago

I'm using the library react-facebook-login v 4.1.1 to login with facebook.

I can't sign in with facebook on my web app on my android/apple phone. It works however on the web app on the computer

I checked the URL and I can't the parameter redirect_uri and the others in the /dialog/oauth facebook root. I have an encrypted_query_string instead :

https://m.facebook.com/dialog/oauth?encrypted_query_string=AeDKQmdtf_a3UiGtz9IEdW-FgkO8sn-wTAMiSfbHKvHvoxSyOUHfgUXZlXWutXrzmlQTI-gvbR-viaKtrGrdhBY6jNpql1i0dSbRL5O4YHmAqqFD3AozXmeFvdANZ7qBCfTgpnwI-KUHQN7VllWBdabDKoymtphXoaxfrzbv4WKJNz14EuKVXuNL-K25i7ZltIYtKlQjtZ6lNFKUMOvxOkRWMBfaO8tR4

Therefore I can't add the redirect URI in facebook app settings.

Does anyone has this issue and know how to fix it ?

Thank you,

mercteil commented 2 years ago

Go to https://developers.facebook.com/ and add your URL to the whitelisted urls. This is not an issue with the package.

hieusonson9x commented 2 years ago

I also got this error in Safari. I still dont know how to fix it I already added redirect_uri to my app settings but it just work fine in Chrome I don't know to real redirect_uri inside encrypted_query_string

balazsjdp commented 2 years ago

Adding disableMobileRedirect={true} as prop solved this for me.