I'm using aspnet core 1.1 and Identity Server 4. I've created a policy in my client Startup.cs that denied all non-verified email accounts to use some sections of the website.
Here's the code of my policy:
//Add policies
services.AddAuthorization(authorizationOptions =>
{
authorizationOptions.AddPolicy(
ApplicationGlobals.Policy_HasValidatedAccount,
policyBuilder =>
{
policyBuilder.RequireAuthenticatedUser();
policyBuilder.RequireClaim(JwtClaimTypes.EmailVerified, "true",
ClaimValueTypes.Boolean);
});
});
The question is: How can I refresh this EmailVerified
claim AFTER the user a confirmed his account? The only way I found was to logout / login ...