- Newest
- Most votes
- Most comments
Hello,
You can use custom attributes when a user signs up. You can use one to store the user type. You can then capture that during sign-up using the Pre-Signup Lambda Trigger - https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html
In combination with that you can use the Post-Authentication or Pre-Token Generation Lambda triggers to assign users to the correct group after they sign in with Google or Apple. These triggers allow you to evaluate the user’s type once they have successfully authenticated, and based on this, you can assign them to the appropriate group using the Cognito API AdminAddUserToGroup. This ensures that users are placed into the correct group after sign-in, based on their attributes or context.
Reference Links:
https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-authentication.html
https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html
Relevant content
- asked 9 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 20 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago