ASP.NET Core 8 external login

788 views Asked by At

ASP.NET Core 8 RC2, Blazor web app template with individual accounts. The register page links to an article regarding external login providers:

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/?view=aspnetcore-8.0&tabs=visual-studio

This provides examples for Google, Facebook, and Microsoft.

The problem is when I try to add this to the program.cs, builder.Services.AddAuthentication().AddGoogle, .AddMicrosoft, etc. doesn't exist.

Does anybody know how to configure this for .NET 8?

1

There are 1 answers

1
RBee On BEST ANSWER

As @Maytham mentions in the comments.

You need to install the respective Nuget package for each provider you're looking to add.

enter image description here

The package name for each provider is available on the respective instructions page here. Ms docs

e.g. Facebook - Microsoft.AspNetCore.Authentication.Facebook