We show you how to authorise a user in your ASP.NET Core application by logging in through their Facebook account.
Integrating Facebook has many benefits including:
Being able to capture personal details from a users Facebook account, such as name and email
Users not having to fill out another form to sign up for something
We start off with creating a Facebook app, and set up Facebook login. A Facebook app is important as this will grant authorisation between Facebook and your ASP.NET Core app.
The Facebook app will generate an App Id and an App Secret. Using this, alongside the Microsoft.AspNetCore.Authentication.Facebook NuGet package, it will help us set up our integration with Facebook very quickly.
In Visual Studio 2019, we setup a sample ASP.NET Core MVC application to integrate Facebook authentication. We set up pages in our application that require authentication.
In addition, we also set up a login page that is used to redirect the user to Facebook to allow them to log in.
Finally, once the user has authorised successfully with Facebook, it redirects the user back to the ASP.NET Core application, and we output the personal data we have retrieved from Facebook.
📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-c...
► More Information: https://www.roundthecode.com/dotnet-t...
#aspnetcore #facebook #authentication
Watch video Allow Your Users to Login to your ASP.NET Core App Through Facebook online without registration, duration hours minute second in high quality. This video was added by user Round The Code 23 September 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 4,732 once and liked it 61 people.