From 8751b829b511693e81a12a60109e458ddea86950 Mon Sep 17 00:00:00 2001 From: Medhat Elmasry Date: Thu, 5 Dec 2024 10:36:14 -0800 Subject: [PATCH] Update AuthenticationService.cs --- src/Api/Service/AuthenticationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Service/AuthenticationService.cs b/src/Api/Service/AuthenticationService.cs index 2c33d274..d76e2458 100644 --- a/src/Api/Service/AuthenticationService.cs +++ b/src/Api/Service/AuthenticationService.cs @@ -67,7 +67,7 @@ public async Task RefreshToken(Token tokenDto) _user = user; - return await CreateToken(populateExp: false); + return await CreateToken(populateExp: true); } private SigningCredentials GetSigningCredentials() @@ -131,7 +131,7 @@ private ClaimsPrincipal GetPrincipalFromExpriedToken(string token) ValidateIssuer = true, ValidateIssuerSigningKey = true, IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(secretKey!)), - ValidateLifetime = true, + ValidateLifetime = false, ValidIssuer = validIssuer, ValidAudience = validAudience };