ASP.NET Core middleware that enables an application to support Facebook's OAuth 2.0 authentication workflow. This package was built from the source code at https://github.com/dotnet/dotnet/tree/c22dcd0c7a78d095a94d20e59ec0271b9924c82c
Install
| Product | Versions |
|---|---|
| .NET |
README
About
Microsoft.AspNetCore.Authentication.Facebook provides ASP.NET Core middleware that enables an application to support Facebook's OAuth 2.0 authentication workflow.
How to Use
To use Microsoft.AspNetCore.Authentication.Facebook, follow these steps:
Installation
dotnet add package Microsoft.AspNetCore.Authentication.Facebook
Configuration
- Refer to the guide in the official documentation here to create the app in Facebook.
- Follow the steps in the official documentation here to store the Facebook app ID and secret.
- Configure the middleware your ASP.NET Core app's
Program.cs:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAuthentication()
.AddFacebook(options =>
{
options.AppId = Configuration["Authentication:Facebook:AppId"];
options.AppSecret = Configuration["Authentication:Facebook:AppSecret"];
});
Main Types
The main types provided by this package are:
FacebookOptions: Represents the options for configuring Facebook authenticationFacebookHandler: The authentication handler responsible for processing Facebook authentication requests and generating the appropriate authentication ticket
Additional Documentation
For additional documentation and examples, refer to the official documentation on Facebook login setup in ASP.NET Core.
Feedback & Contributing
Microsoft.AspNetCore.Authentication.Facebook is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.