Allow Your Users to Login to your ASP.NET Core App Through Facebook

Опубликовано: 23 Сентябрь 2020
на канале: Round The Code
4,732
61

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


Смотрите видео Allow Your Users to Login to your ASP.NET Core App Through Facebook онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Round The Code 23 Сентябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,732 раз и оно понравилось 61 людям.