Javascript Parse Facebook Login Issue

后端 未结 4 2135
日久生厌
日久生厌 2020-12-05 14:25

I am getting:

Given URL is not whitelisted in Client OAuth Settings: This redirect failed because the redirect URI is not whitelisted in the app’s C

4条回答
  •  天涯浪人
    2020-12-05 14:58

    I also faced the error while trying to integrate Facebook login on my localhost in a Rails app and fixed it by removing the trailing slash from the URL specified in Valid OAuth redirect URIs

    It was: http://localhost:3000/auth/facebook/callback/

    It was supposed to be http://localhost:3000/auth/facebook/callback

    Thanks to @CBroe comment to check the redirect_uri and found that in the URL in the browser's address bar it was

    https://www.facebook.com/dialog/oauth?client_id=&redirect_uri=http://localhost:3000/auth/facebook/callback&response_type=code&scope=email&state=afcbee26c2ce5077f844ce864780082991d36e6c3e10863a

    and in my Valid OAuth redirect URIs it was mentioned http://localhost:3000/auth/facebook/callback/ (note the trailing slash at the end)

    Hope this helps anyone facing this problem with the URL problem I had.

提交回复
热议问题