#oauth cleanup

This commit is contained in:
Dominic Villemure
2024-06-09 23:53:43 -04:00
parent 6f76cb2084
commit 66bfeea3ee
4 changed files with 16 additions and 9 deletions

View File

@@ -93,13 +93,16 @@ public static class DependencyInjection
ValidateAudience = true,
ValidAudience = configuration["Jwt:Audience"],
ValidateLifetime = true,
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(configuration["Jwt:Key"] ?? ""))
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(configuration["Jwt:Key"] ??
throw new ArgumentNullException("The Jwt Key is missing.")))
};
})
.AddGoogle(GoogleDefaults.AuthenticationScheme, options =>
{
options.ClientId = configuration["Google:ClientId"] ?? "";
options.ClientSecret = configuration["Google:ClientSecret"] ?? "";
options.ClientId = configuration["Google:ClientId"] ??
throw new ArgumentNullException("The Google ClientId is missing.");;
options.ClientSecret = configuration["Google:ClientSecret"] ??
throw new ArgumentNullException("The Google ClientSecret is missing.");;
})
.AddFacebook(FacebookDefaults.AuthenticationScheme, options =>
{