oauth fixes to be able to use vault for env vars

This commit is contained in:
Dominic Villemure
2024-06-16 11:00:40 -04:00
parent 3902511e68
commit 568a5c99ca
5 changed files with 20 additions and 27 deletions

View File

@@ -58,11 +58,11 @@ public class GoogleController(IIdentityService identityService, IHttpClientFacto
var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(claimsIdentity));
var issuer = configuration["Jwt:Issuer"] ??
var issuer = configuration["Jwt-Issuer"] ??
throw new ArgumentNullException("The Jwt issuer is missing.");
var audience = configuration["Jwt:Audience"] ??
var audience = configuration["Jwt-Audience"] ??
throw new ArgumentNullException("The Jwt audience is missing.");
var key = configuration["Jwt:Key"] ??
var key = configuration["Jwt-Key"] ??
throw new ArgumentNullException("The Jwt key is missing.");
var jwtToken = JwtTokenHelper.GenerateJwtToken(issuer, audience, key, user.Id);