authentication fix

This commit is contained in:
2024-09-17 20:32:22 +02:00
Unverified
parent 7976e1936a
commit 1498e3bd6c
15 changed files with 149 additions and 76 deletions

View File

@@ -113,8 +113,13 @@ public class JWTAuthenticationStateProvider : AuthenticationStateProvider
private async Task<string?> Refresh(string refreshToken)
{
AuthenticateResponse? response = null;
void SetResponse(AuthenticateResponse data)
{
response = data;
}
await _accountsService.AuthenticateRefresh((data) => response = data);
await _accountsService.AuthenticateRefresh(SetResponse);
if (response is not null)
{
@@ -151,8 +156,9 @@ public class JWTAuthenticationStateProvider : AuthenticationStateProvider
public static DateTime ConvertFromUnixTimestamp(int timestamp)
{
DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0);
return origin.AddSeconds(timestamp);
DateTime date = new DateTime(1970, 1, 1, 0, 0, 0, 0);
date = date.AddSeconds(timestamp);
return date;
}
#endregion