Cognito Hosted UI redirects user to secondary login page after successful login

0

Hi,

I am using the Cognito Hosted UI for a project, I am having issues with the login flow. How it currently works is that the user would log into my application through MFA using Authenticator Apps. After successful login they should access the homepage of my app (which is a Protected Route). The problem is that the user is instead redirected to the "Sign In as username" page instead of being directly logged in.

sign in as image

Does anyone have any suggestions as to what the issue is

asked 8 months ago365 views
1 Answer
0

It seems there might be an issue with the configuration of your Amazon Cognito setup, possibly related to the redirection rules after the MFA process is completed. The expected behavior, as outlined in the Amazon Cognito documentation, is that after signing in and completing MFA, Amazon Cognito should grant access to your app directly.

If this is not happening, it may be necessary to review the configuration of your Cognito User Pool, specifically the App client settings related to the sign-in and redirect URLs, and also to ensure that the callback URLs are properly set up to direct the user to the desired destination after login.

I would recommend checking the following:

  1. The callback URL in the App client settings: Ensure that it points to the homepage of your app.
  2. The sign-in flow settings: Ensure that they're configured to redirect the user after MFA completion.
  3. Session handling: Confirm that the session tokens are being correctly created and validated.
AWS
Drew D
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions