1

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

1
  • You are making an http connection to a server to modify the authentication parameters. What is the status code that is returned which will tell the type of error. You need to make the connection as a ADMIN to modify these parameters. Most likely you are getting UNAUTH. Are you running from VS. If so to get Admin privilege right click the VS shortcut and then select Run As Admin. Commented Jul 29 at 21:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.