Description
Description
Currently API(Rest) is hard coded to use accessToken
, which requires scope definition for using Cognito as COGNITO_USER_POOLS
authorizer with API Gateway, and is not really a use case for us. We want to be able to pass idToken
instead of accessToken
, but there is no provision for the same.
It will be really great, if we could somehow choose it as part of config process, or may be while making the API calls?
COGNITO_USER_POOLS
usage excerpt from Amazon API Gateway Developer Guide
To use an access token, do the following:
Choose the pencil icon next to OAuth Scopes.
Type one or more full names of a scope that has been configured when the Amazon Cognito user pool was created. For example, following the example given in Create an Amazon Cognito user pool for a REST API, one of the scopes is https://my-petstore-api.example.com/cats.read. Use a single space to separate multiple scopes.
At runtime, the method call succeeds if any scope that's specified on the method in this step matches a scope that's claimed in the incoming token. Otherwise, the call fails with a 401 Unauthorized response.
To save the setting, choose the check mark icon.
Categories
- Analytics
- API (REST)
- API (GraphQL)
- Auth
- Authenticator
- DataStore
- Notifications (Push)
- Storage
Steps to Reproduce
No response
Screenshots
No response
Platforms
- iOS
- Android
- Web
- macOS
- Windows
- Linux
Flutter Version
3.10.2
Amplify Flutter Version
1.2.0
Deployment Method
Amplify CLI
Schema
No response