aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
166 stars 55 forks source link

Allow user switching between different groups if the user is in multiple groups #2046

Open lwang-79 opened 4 days ago

lwang-79 commented 4 days ago

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.

lwang-79 commented 4 days ago

Found the similar FR in JavaScript library https://github.com/aws-amplify/amplify-js/issues/1125

ykethan commented 4 days ago

Hey @lwang-79, thank you for reaching. Marking as feature request to support switching between group roles.