Authenticated Login Callback not working

I am attempting to authenticate a user using a MVC application and a Okta Universal Login page and am experiencing an issue with the callback. I can successfully login however after authentication, the callback does not call the home page in the application.

In the web config, I have . The value is set the same as the universal login page listed in the Branding, Universal login advanced settings url.

Regarding the allowed callback urls: I have the following:
https://localhost:44300/, https://mydomain.us.auth0.com/login.

(Without having https://mydomain.us.auth0.com/login in the allowed callback urls, the application returns an issue “Callback URL mismatch”, so it appears it’s necessary for this url to be in the callback urls.)

After successfully authenticating, the application will try to redirect to https://mydomain.us.auth0.com/login, and indicates it cannot find the page. However, I would like it to redirect to the home page after authenticating. How can my settings be changed to accomplish this?

My sincere thanks for any insights/suggestions.

Hi @OpenHorizons What are you passing as the value for the redirect_uri parameter in your /authorize request?

1 Like

Thank you for your response, it helped me narrow my focus. So, I have it working now and will progress on.

Here’s how I set it up to accomplish it:
-The Application Login URI is left blank.
-Allowed Callback URL is set to: https://localhost:44300/callback
-Allowed Logout URL is set to: https://localhost:44300/
In the webconfig file, keys are set as:

Interestingly, after setting these values and testing, it exposed another issue with versioning of Microsoft.IdentityModel.JsonWebTokens. Once, updating this version, I was able to log in and the application redirects to the home route. Upon clicking logout, it redirects back to home and indicates logged out.

I will begin the research on how to retrieve user details from the token, then work on MFA with the test application.

My sincere appreciation for the help.

1 Like