Fix issue with missing configuration for Facebook or Google

This commit is contained in:
Jonathan Bourdon
2024-06-20 13:40:55 -04:00
parent 73b43c80cb
commit 9a360dc407
2 changed files with 54 additions and 31 deletions

View File

@@ -218,12 +218,15 @@ public class IdentityService(
{
return null;
}
var user = await GetUserByUserNameAsync(userName);
var jwtSection = configuration.GetRequiredSection("Authentication:Jwt");
var token = JwtTokenHelper.GenerateJwtToken(
issuer: configuration["Jwt-Issuer"] ?? "",
audience: configuration["Jwt-Audience"] ?? "",
key: configuration["Jwt-Key"] ?? "",
issuer: jwtSection["Issuer"] ?? "",
audience: jwtSection["Audience"] ?? "",
key: jwtSection["Key"] ?? "",
userId: user?.Id ?? "");
return token;