I have this plugin declaration:
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<Type, string[]>
{
{
typeof(CustomAuthenticateService),
["/auth", "/auth/{provider}", "/authenticate", "/authenticate/{provider}"]
}
}
}
);
But this causes a problem with the UI, in appearance, the UI does not find the link /auth?callback=loadAuth in the API, and does not show the forms for entering credentials or viewing dashboards and admin features.
Does anyone know how I could solve this problem? I'm trying to build an endpoint that responds to that link, but I'm not sure if it's the best solution.
Thanks in advance