0

I am trying to figure out how to use Azure Function with Facebook login using the EasyAuth but when I try to access my app I keep getting the following error:

URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.

On the Facebook developer page I have added in the Facebook Login product and under the option Valid OAuth Redirect URIs I inserted the following urls

https://myapp.azurewebsites.net/.auth/login/facebook
https://myapp.azurewebsites.net

and the options Client OAuth Login and Web OAuth Login are both on.

In the Azure portal for the Azure Function I have added the Facebook login under MyApp / Authentication / Authorization

Is there something else I need to configure to make this work?

doorman
  • 15,707
  • 22
  • 80
  • 145
  • 1
    https://stackoverflow.com/questions/37001004/facebook-login-message-url-blocked-this-redirect-failed-because-the-redirect – Sajeetharan Jan 02 '20 at 19:00

1 Answers1

1

I reproduce your issue with the same error message.

enter image description here

In the Valid OAuth redirect URIs field, just enter the url with https://<app-name>.azurewebsites.net/.auth/login/facebook/callback and it will work well. Remember to replace <app-name> with the name of your Azure App Service app.

For more details, you could refer to this article to Configure your App Service app to use Facebook login.

Joey Cai
  • 18,968
  • 1
  • 20
  • 30