fix: Session is now stored in protected local storage and not in session storage, making the login persistant between pages
This commit is contained in:
parent
b1a6ab211e
commit
2d458fd2f2
1 changed files with 3 additions and 2 deletions
|
@ -7,10 +7,11 @@ namespace ImageBoardServerApp.Auth;
|
|||
|
||||
public class CustomAuthenticationStateProvider : AuthenticationStateProvider
|
||||
{
|
||||
private readonly ProtectedSessionStorage _sessionStorage;
|
||||
private readonly ProtectedLocalStorage _sessionStorage;
|
||||
|
||||
private ClaimsPrincipal _anonymous = new ClaimsPrincipal(new ClaimsIdentity());
|
||||
|
||||
public CustomAuthenticationStateProvider(ProtectedSessionStorage sessionStorage)
|
||||
public CustomAuthenticationStateProvider(ProtectedLocalStorage sessionStorage)
|
||||
{
|
||||
_sessionStorage = sessionStorage;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue