AspNetCore.Docs
AspNetCore.Docs copied to clipboard
Sample project about "Persist additional claims ..." does not work
There has a bug in the sample code that make the app cannot persist tokens.
The sample only instructs to persist tokens after logging in without being registered before. https://github.com/dotnet/AspNetCore.Docs/blob/ce2f890e9c9af43bf542c0f6037edae9a0be406c/aspnetcore/security/authentication/social/additional-claims/samples/6.x/ClaimsSample/Areas/Identity/Pages/Account/ExternalLogin.cshtml.cs#LL264C1-L272C18
The sample app enables the RequireConfirmedAccount
option. As a result, _signInManager.SignInAsync
cannot reach. It can work as expected if we disable it.
Or, we can update the OnGetCallbackAsync
handler to persist tokens.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 64faf33b-2511-5e8f-c1b0-94f32dc07fa4
- Version Independent ID: 2697abc8-7727-2eba-74a5-fbbc8a7c80ff
- Content: Persist additional claims and tokens from external providers in ASP.NET Core
- Content Source: aspnetcore/security/authentication/social/additional-claims.md
- Product: aspnet-core
- Technology: aspnetcore-security
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande