i am developing an xamarin app. Usermanagement is done via Cognito. I would like to use the accessToken for authentication at the api gateway. So I defined a scope which is allowed to call the function at the api gateway. So now my problem: How can I add the scope to the accessToken while login in? I use the .Net SDK. Are there any samples? The only scope in the access token is currently the aws.cognito.signin.user.admin. How can there additional scopes be added?
Asked
Active
Viewed 129 times
0
-
Have you checked the AWS Docs? https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-enable-cognito-user-pool.html – Hichame Yessou Jun 24 '18 at 16:04
-
yes, but I did not find any about adding the scope to the access token in .Net api – chris000r Jun 24 '18 at 16:22
-
Have you tried using the Cognito Pre-Token lambda function to add the scope? https://aws.amazon.com/blogs/mobile/how-to-use-cognito-pre-token-generators-to-customize-claims-in-id-tokens/ – Jason Pascoe Nov 24 '20 at 06:58