Oauth scopes setup for API gateway

api-gateway
#1

Hi,

I found this plugin but it does not work for me:

I have added:

http:
path: v1/file/url
method: post
cors: true
scopes: [scope1]
authorizer:

After deploy OAuth scope is not set in API gateway

Best regards,
Grega

#2

Hi, if I’m not mistaken right now serverless has native support for this feature. https://github.com/serverless/serverless/issues/4661
https://github.com/serverless/serverless/pull/6000
Is this what you need?

#4

Thank you. It works. Just for reference without plugin and with the following syntax:

- http:
          path: /my/api
          method: get
          authorizer:
            arn:arn:aws:cognito-idp:ap-southeast-2:XXXXXXX:userpool/ap-southeast-2_mypool
            scopes:
              - myscope/read
              - aws.cognito.signin.user.admin
#5

Cool, thank you for letting me know. I haven’t used it before but it always good to know as much as possible :slight_smile: