feat: finished email confirmation, finished Password Reset

!fix: The user auth system now uses the id, not the email

Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
limited_dev 2023-06-09 09:45:14 +02:00
parent 828f784fc8
commit e8e97b2cd9
11 changed files with 89 additions and 20 deletions

View file

@ -27,7 +27,7 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
var claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity(new List<Claim>
{
//new Claim(ClaimTypes.Email, userSession.Email),
new Claim(ClaimTypes.Name, userSession.Email),
new Claim(ClaimTypes.Name, userSession.UserID.ToString()),
new Claim(ClaimTypes.Role, userSession.Role)
}, "CustomAuth"));
return await Task.FromResult(new AuthenticationState(claimsPrincipal));
@ -47,7 +47,7 @@ public class CustomAuthenticationStateProvider : AuthenticationStateProvider
await _sessionStorage.SetAsync("UserSession", session);
claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity(new List<Claim>
{
new Claim(ClaimTypes.Email, session.Email),
new Claim(ClaimTypes.Email, session.UserID.ToString()),
new Claim(ClaimTypes.Email, session.Role)
}));
}