简体   繁体   English

AWS Cognito 托管的注册和登录页面的空白页面

[英]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.我的要求是使用 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: 如果您只是在现有URL中添加/login ,您将开始收到有用的错误消息:

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

It's not documented very well, but your URL also requires some parameters: 它没有很好地记录,但您的URL也需要一些参数:

  • client_id - relates to the app for the identity provider. client_id - 与身份提供者的应用程序相关。
  • redirect_url - should match your redirect url from the UserPool app settings. redirect_url - 应与UserPool应用设置中的重定向网址匹配。
  • response_type - token (or code). response_type - 令牌(或代码)。

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: URL 应采用以下格式:


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


Variables can be found in AWS > Amazon Cognito > User Pool > App Integration Tab可以在 AWS > Amazon Cognito > 用户池 > 应用程序集成选项卡中找到变量

Domain:领域: 在此处输入图片说明

Client ID of the App应用的客户端 ID 在此处输入图片说明

Callback URL of the App应用回调地址在此处输入图片说明

Pleaser refer Cognito document for more info.请参阅Cognito 文档以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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