AWS Cognito如何在使用联合身份进行注册时将用户添加到用户池? [英] AWS Cognito How to add user to user pool on sign up using federated identities?

查看:201
本文介绍了AWS Cognito如何在使用联合身份进行注册时将用户添加到用户池?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用AWS Cognito对用户进行身份验证。如果用户通过用户名和密码进行了身份验证,那么我可以使用AWS会话识别他,也可以使用AWS注销他。
但是,如果用户使用facebook或google进行了身份验证,则他不会进入用户池。首先,我应该在facebook和google中初始化用户,然后可以使用来自facebook和google的令牌从AWS获取凭证。注销按钮应从Facebook和google SDK执行注销功能。

I want to authenticate user using AWS Cognito. If user authenticated by username and password then I can identify him using AWS session, I can logout him using AWS. But if user authenticated using facebook or google then he does not get into user pool. First, I should initialize user in facebook and google, then I can get credentials from AWS using tokens from facebook and google. Logout button should execute logout function from facebook and google SDK.

我想在用户使用Facebook和Google进行注册时将用户添加到用户池中。

I want to add user to user pool when user sign up using facebook and google. Is it possible?

推荐答案

在2017年末添加了将Facebook / Google联盟与Cognito用户池结合的功能。文档为可在此处获得: https:// docs .aws.amazon.com / cognito / latest / developerguide / cognito-user-pools-social.html

The ability to combine Facebook/Google federation with Cognito User Pools was added late in 2017. The documentation is a is available here: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-social.html

基本上,您可以将外部社交服务与通过在AWS Web控制台中查看用户池时在联合身份验证>身份提供者部分中对其进行配置,来配置您的Cognito用户池。您授权所需的范围,并将它们链接到用户池属性。然后,当某人与外部系统联合时,将在您的用户池中创建一个具有相应值的Cognito用户。

Essentially you can connect an external social service with your Cognito User Pool by configuring it in the "Federation > Identity Providers" section when viewing your user pool in the AWS web console. You authorize the scopes you need and link them to user pool attributes. Then when someone federates with the external system, a Cognito user is created in your user pool with the corresponding values.

这篇关于AWS Cognito如何在使用联合身份进行注册时将用户添加到用户池?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆