Store the sensitive settings in the local secret store with the secret keys Authentication:Facebook:AppId and Authentication:Facebook:AppSecret: dotnet user-secrets set "Authentication:Facebook:AppId" ""ĭotnet user-secrets set "Authentication:Facebook:AppSecret" "" Initialize the project for secret storage per the instructions at Enable secret storage. For this sample, use the following steps: Store sensitive settings such as the Facebook app ID and secret values with Secret Manager. When deploying the site you need to revisit the Facebook Login setup page, and register a new public URI. You will add both into your ASP.NET Core application in the next section: ![]() ![]() Make a note of your App ID and your App Secret. Select Settings > Basic link in the left navigation. You can change the default callback URI while configuring the Facebook authentication middleware via the inherited RemoteAuthenticationOptions.CallbackPath property of the FacebookOptions class. The URI /signin-facebook is set as the default callback of the Facebook authentication provider. The Client OAuth Settings page is presented:Įnter your development URI with /signin-facebook appended into the Valid OAuth Redirect URIs field (for example: The Facebook authentication configured later in this tutorial will automatically handle requests at /signin-facebook route to implement the OAuth flow. Bypass the wizard for now by clicking the FaceBook Login Settings link in the menu on the lower left: The Quickstart wizard launches with Choose a Platform as the first page. On the Add Products to Your App page, select Set Up on the Facebook Login card. A new App ID is created.įill out the form and tap the Create App button. For this project, select Consumer, and then Next. Select an app type that best fits your project. ![]() Once you have a Facebook account, follow the instructions to register as a Facebook Developer.įrom the My Apps menu select Create App. If you don't already have a Facebook account, use the Sign up for Facebook link on the login page to create one. Navigate to the Facebook Developers app page and sign in. Create the app in FacebookĪdd the NuGet package to the project. We start by creating a Facebook App ID by following the official steps. This tutorial with code examples shows how to enable your users to sign in with their Facebook account using a sample ASP.NET Core project created on the previous page.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |