Adds messages api

This commit is contained in:
Jonathan Bourdon
2024-06-27 12:37:59 -04:00
parent 891597fb08
commit 72e243cf84
21 changed files with 485 additions and 61 deletions

View File

@@ -64,10 +64,14 @@ public class GoogleController(IIdentityService identityService, IHttpClientFacto
var jwtSection = configuration.GetRequiredSection("Authentication:Jwt");
var token = JwtTokenHelper.GenerateJwtToken(
issuer: jwtSection["Issuer"] ?? throw new ArgumentNullException("The Jwt issuer is missing."),
audience: jwtSection["Audience"] ?? throw new ArgumentNullException("The Jwt audience is missing."),
key: jwtSection["Key"] ?? throw new ArgumentNullException("The Jwt key is missing."),
userId: user.Id);
jwtSection["Issuer"] ?? throw new ArgumentNullException("The Jwt issuer is missing."),
jwtSection["Audience"] ?? throw new ArgumentNullException("The Jwt audience is missing."),
jwtSection["Key"] ?? throw new ArgumentNullException("The Jwt key is missing."),
user.Id,
user.Email,
user.FirstName,
user.LastName,
user.PortraitUrl);
return Ok(new { accessToken = token, email });
}