AWS cognito: sign in with usernam/password OR facebook

回眸只為那壹抹淺笑 提交于 2019-11-28 09:19:19
  1. I'm human and may have missed something, but that sounds pretty good to me.

  2. You can't store a federated identities login in user pools. Thing of user pools as another identity provider, just like Facebook is. Dynamo (or something else) would be the way to go.

  3. If a user logged in with both, linking those logins, you might want to consider avoiding user pools attributes entirely and only using dynamo. With two logins linked, Cognito federated identities only requires one login token to proceed, but user pools requires it's login token to see/update attributes. The user would have to login with the user pool to touch those attributes, it'd get messy.

  4. I don't know that this is supported out of the box, like it is with user pools. You might have to do this using your hypothetical user database described above.
  5. You can also link your user pool to Cognito as a provider, much like you do for Facebook. That's how you exchange an id token for credentials.
  6. No official example from the service, though I can't speak for others.

We added support for Federation through Facebook, Google and LoginWithAmazon for User Pools. This will create a user in user pool when a user logs in with federation. You can also capture the attributes from the identity provider using the attribute mapping feature.

Also if you use the app integration feature, Amazon Cognito User Pools wil generate a sign-in page like this for you.

Steps to SignIn/SignUp with a social provider through Amazon Cognito Console:

  1. Configure a domain for your user pool like .auth..amazoncognito.com
  2. Add any social provider and configure attribute mapping.
  3. Enable the provider on the App Client.
  4. Configure the callback URI, OAuth response type and allowed scopes.
  5. Access your hosted UI at https://.auth..amazoncognito.com/login?client_id=&response_type=&redirect_uri=
  6. Click on the button to SignUp/SignIn with Facebook (or your provider).
  7. Authenticate with the provider, you will be redirected to the callback URI with tokens/code.
  8. Check the newly created user in Amazon Cognito console.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!