Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty page for the sign-up and sign-in pages hosted by AWS Cognito

I have created the user pool and added new users to the user pool. My requirement is to use the default sign up/login page provided by cognito. So after retrieving the domain name for the hosted page it renders an empty page.

enter image description here

enter image description here

By simply entering the domain ends in several errors in the console. Appreciate if any one has identified the root cause for this.

like image 731
Nirojan Selvanathan Avatar asked Mar 30 '18 06:03

Nirojan Selvanathan


People also ask

How do I verify my email on AWS Cognito?

Amazon Cognito can automatically verify email addresses or phone numbers. To do this verification, Amazon Cognito sends a verification code or a verification link. For email addresses, Amazon Cognito can send a code or a link in an email message. For phone numbers, Amazon Cognito sends a code in an SMS text message.


2 Answers

If you simply add a /login to your existing URL you'll start to get useful error messages:

https://praedictio.auth.eu-west-1.amazoncognito.com/login

It's not documented very well, but your URL also requires some parameters:

  • client_id - relates to the app for the identity provider.
  • redirect_url - should match your redirect url from the UserPool app settings.
  • response_type - token (or code).

 

https://praedictio.auth.eu-west-1.amazoncognito.com/login?response_type=code&client_id=(client_id)&redirect_uri=(encoded uri)
like image 178
user746585 Avatar answered Oct 11 '22 08:10

user746585


URL should be in the following format:


https://domain/login?response_type=code&client_id=client_id&redirect_uri=your_callback_url


Variables can be found in AWS > Amazon Cognito > User Pool > App Integration Tab

Domain: enter image description here

Client ID of the App enter image description here

Callback URL of the App enter image description here

Pleaser refer Cognito document for more info.

like image 22
HGG-Dev Avatar answered Oct 11 '22 09:10

HGG-Dev