【发布时间】:2020-10-17 12:30:11
【问题描述】:
这个想法是使用 AWS Cognito 和 Google Login 作为联合实体来执行登录/身份验证 + 自动化。
一切都在客户端使用 AWS javascript SDK 完成。
我可以使用https://.auth.eu-central-1.amazoncognito.com/oauth2/authorize?identity_provider=Google&redirect_uri=https://&response_type=token&client_id=<Client_id> 登录。我将我重定向到我的网站并在 URL 中添加 access_token。我可以使用 CognitoIdentityCredentials 函数取回 AWS 访问权限和密钥。
问题:
- 如何处理这个 access_token?
- 我需要调用哪个函数来获取当前用户?
- 我需要
access_key和secret_key吗?
【问题讨论】:
-
看来你混淆了很多点。请再次查看有关 Cognito Userpool 和 Cognito Identity 的文档。
-
我听取了您的建议,看来我不需要身份部分。但我不明白如何使用令牌。我正在使用 API Gateway sdk
标签: javascript authentication amazon-cognito google-signin