Код: Выделить всё
Plugins.Add(new AuthFeature(() => new CustomUserSession(),
new IAuthProvider[]
{
new CustomCredentialsAuthProvider(),
new FacebookAuthProvider(AppSettings), //Sign-in with Facebook
new GoogleOAuth2Provider(AppSettings), //Sign-in with Google OAuth2 Provider
new GoogleOAuth2Provider(AppSettings, "IosGoogleOAuth"),
new GoogleOAuth2Provider(AppSettings, "AndroidGoogleOAuth"),
new CustomJwtAuthProvider(AppSettings),
new CustomJwtAuthProviderReader(AppSettings),
new AppleAuthProvider(AppSettings),
})
{
IncludeRegistrationService = false,
MaxLoginAttempts = AppSettings.Get("User.MaxLoginAttempts", 7),
ValidateUniqueEmails = false,
SessionExpiry = TimeSpan.FromMinutes(AppSettings.Get("SessionExpirationMinutes", 30)),
// NOTE: Add /authenticate route for backwards compatibility
ServiceRoutes = new Dictionary
{
{
typeof(CustomAuthenticateService),
["/auth", "/auth/{provider}", "/authenticate", "/authenticate/{provider}"]
}
}
});
Заранее, спасибо.
Подробнее здесь: https://stackoverflow.com/questions/797 ... thenticate