fb app login
How to configure Facebook authentication for your App Services application
How to configure your App Service application to use Facebook login
This topic shows you how to configure Azure App Service to use Facebook as an authentication provider.
To complete the procedure in this topic, you must have a Facebook account that has a verified email address and a mobile phone number. To create a new Facebook account, go to facebook.com.
Register your application with Facebook
Log on to the Azure portal, and navigate to your application. Copy your URL. You will use this to configure your Facebook app.
In another browser window, navigate to the Facebook Developerswebsite and sign-in with your Facebook account credentials.
(Optional) If you have not already registered, click Apps > Register as a Developer, then accept the policy and follow the registration steps.
Click My Apps > Add a New App.
In Display Name, type a unique name for your app. Also provide your Contact Email, and then click Create App ID and complete the security check. This takes you to the developer dashboard for your new Facebook app.
Under Facebook Login, click Set up, and then choose Settings in the left-hand navigation under Facebook Login.
Add your application's Redirect URI to Valid OAuth redirect URIs, then click Save Changes.
Your redirect URI is the URL of your application appended with the path, /.auth/login/facebook/callback. For example, https://contoso.azurewebsites.net/.auth/login/facebook/callback. Make sure that you are using the HTTPS scheme.
In the left-hand navigation, click Settings > Basic. On the App Secret field, click Show, provide your password if requested, then make a note of the values of App ID and App Secret. You use these later to configure your application in Azure.
Important
The app secret is an important security credential. Do not share this secret with anyone or distribute it within a client application.
The Facebook account which was used to register the application is an administrator of the app. At this point, only administrators can sign into this application. To authenticate other Facebook accounts, click App Review and enable Make public to enable general public access using Facebook authentication.
Add Facebook information to your application
Back in the Azure portal, navigate to your application. Click Settings > Authentication / Authorization, and make sure that App Service Authentication is On.
Click Facebook, paste in the App ID and App Secret values which you obtained previously, optionally enable any scopes needed by your application, then click OK.
By default, App Service provides authentication but does not restrict authorized access to your site content and APIs. You must authorize users in your app code.
(Optional) To restrict access to your site to only users authenticated by Facebook, set Action to take when request is not authenticated to Facebook. This requires that all requests be authenticated, and all unauthenticated requests are redirected to Facebook for authentication.
When done configuring authentication, click Save.
0 comments:
Post a Comment
Facebook has greatly reduced the distribution of our stories in our readers' newsfeeds and is instead promoting mainstream media sources. When you share to your friends, however, you greatly help distribute our content. Please take a moment and consider sharing this article with your friends and family. Thank you.