I'm developing a mobile app and I'm planning to have the backend APIs in AWS lambda. I was able to add federated authentication to my app using Cognito and it works. I also want to authorize the lambda API calls by Cognito users. To do that I need to add a custom scope.
On my app I'm using this code to kick off the sign in/sign up flow. But it doesn't take into account the newly added scopes. When I click the sign in button on my app and check the redirected url, it doesn't have the newly added custom scope
Amplify.configure(amplify);
Auth.federatedSignIn()
I have allowed the new scope in Cognito Allowed Custom Scopes for app client settings. I also noted that the aws-exports.js has not been updated with the new custom scope. I tried amplify pull but it didn't update the file. (I'm new to this and I followed tutorials here and there to get this working, not sure if I have missed anything)
How can I get custom scopes working in my app?