Add provider-neutral Google authentication
This commit is contained in:
@@ -49,6 +49,10 @@ builder.Services.AddSingleton<JwtTokenService>();
|
||||
builder.Services.AddSingleton<LegalPolicy>();
|
||||
builder.Services.AddSingleton<SteamAuthTransactionStore>();
|
||||
builder.Services.AddSingleton<SteamOpenIdService>();
|
||||
builder.Services.AddSingleton<ExternalIdentityStore>();
|
||||
builder.Services.AddSingleton<ExternalAuthTransactionStore>();
|
||||
builder.Services.AddSingleton<IExternalAuthProvider, SteamExternalAuthProvider>();
|
||||
builder.Services.AddSingleton<IExternalAuthProvider, GoogleExternalAuthProvider>();
|
||||
builder.Services.AddSingleton<PasswordResetStore>();
|
||||
builder.Services.AddSingleton<PasswordResetCodeService>();
|
||||
builder.Services.AddSingleton<IPasswordResetEmailSender, SmtpPasswordResetEmailSender>();
|
||||
@@ -78,6 +82,9 @@ builder.Services.AddRateLimiter(options =>
|
||||
options.AddPolicy("steam-start", context => Fixed(context, 10, TimeSpan.FromMinutes(1)));
|
||||
options.AddPolicy("steam-poll", context => Fixed(context, 120, TimeSpan.FromMinutes(1)));
|
||||
options.AddPolicy("steam-complete", context => Fixed(context, 20, TimeSpan.FromMinutes(1)));
|
||||
options.AddPolicy("external-start", context => Fixed(context, 10, TimeSpan.FromMinutes(1)));
|
||||
options.AddPolicy("external-poll", context => Fixed(context, 120, TimeSpan.FromMinutes(1)));
|
||||
options.AddPolicy("external-complete", context => Fixed(context, 20, TimeSpan.FromMinutes(1)));
|
||||
options.RejectionStatusCode = StatusCodes.Status429TooManyRequests;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user