简体   繁体   中英

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.

在此处输入图片说明

在此处输入图片说明

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

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)

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: 在此处输入图片说明

Client ID of the App 在此处输入图片说明

Callback URL of the App在此处输入图片说明

Pleaser refer Cognito document for more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM