AWS Cognito/Amplify - have new user sign ups be automatically add to a user group

前端 未结 4 2104
悲哀的现实
悲哀的现实 2020-12-24 09:24

I am using AWS Amplify library to sign up and perform Auth for an AppSync project. This uses Cognito. However, when a new user signs up via Amplify/Cognito, the new user

4条回答
  •  隐瞒了意图╮
    2020-12-24 10:08

    Cognito won't know which group a newly signed-up user needs to be a part of. You have to programmatically (or manually) assign the user to a specific group. Once your code places the user into a specific group, the JWT ID token will contain a list of all of the relevant groups/IAM roles that this users is a part of.

    More info on groups here.

提交回复
热议问题