amplify-backend
amplify-backend copied to clipboard
Allow user switching between different groups if the user is in multiple groups
Environment information
NA
Describe the feature
Problem: If a user is in multiple groups, currently there is not a way to specify the group during login so that the user can assume different roles.
Possible solution:
According to the Cognito documentation, the solution is to specify the CustomRoleARN parameter in the GetCredentialsForIdentity API call. Therefore the role ARN should be exported to the amplify_outputs.json file, and then the frontend amplify library should use this information to call the API.
Use case
Allow users switching between different groups.
Found the similar FR in JavaScript library https://github.com/aws-amplify/amplify-js/issues/1125
Hey @lwang-79, thank you for reaching. Marking as feature request to support switching between group roles.