AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Sample project about "Persist additional claims ..." does not work

Open vancodocton opened this issue 1 year ago • 0 comments

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.

vancodocton avatar Jun 13 '23 15:06 vancodocton