need access token as header in cognito


We need access token as header in cognito authorizer is the only way is to add custom scope to do it? How custom scope can be configured in sam template? "

asked 3 months ago58 views
1 Answer

If there are no scopes defined the API Gateway Cognito Authorizer will require the ID Token. If you require to use the Access Token then you will need to define one or more scopes in your Method Request OAuth scopes. These scopes will also need to be in your Access Token. Scopes can be defined with CloudFormation reference AWS::ApiGateway::Method then see AuthorizationScopes.

profile picture
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions