'How to fix AWS Cognito Hosted UI Error on Sign Up?

The AWS Cognito Hosted UI page redirects to the following error page after signing up a new user. Everything works fine for login, but the response for sign-up is a 302 redirect to the /error page (shown below). The user actually gets signed up correctly in the Cognito User Pool, but I would like the re-direct to my callback URL to work correctly, rather than displaying this error page.

Error Page

I have confirmed that I have the correct flows and scopes selected (shown below)

Scopes and Flows



Solution 1:[1]

Be sure you are using correct domain name and client id

Solution 2:[2]

In our case this happens when you disable the automatic account verification. After looking at the network errors, it seems it's a cloudfront error and I can only imagine this happens because cloudfront just tries to redirect to a page (confirmation) that's not accessible (because we disabled it), hence the 400 (although a 404 would be better)

A workaround would be to edit the cloudfront, but as it's managed by aws, i am not sure if it's possible.

two options:

  • either bypass the hosted ui completely and implement the auth page by yourself
  • enable the automatic account verification

Solution 3:[3]

You can go to MFA and Verifications, and set the activation email. This error is due to the fact that something post account creation goes wrong. In my case it was the fact that verification email wasn't set.enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 berkaygurbuz
Solution 2 fs_pt
Solution 3