AWS Cognito How to add user to user pool on sign up using federated identities?

久未见 提交于 2019-12-11 08:29:35

问题


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.

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


回答1:


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

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.



来源:https://stackoverflow.com/questions/44436680/aws-cognito-how-to-add-user-to-user-pool-on-sign-up-using-federated-identities

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!