1 Answer
- Newest
- Most votes
- Most comments
2
I found a solution by setting the following parameter on each request:
authMode: "AMAZON_COGNITO_USER_POOLS"
In retrospect, it seems logical to set the authMode on a query or mutation if you have multiple auth options configured. However, many tutorials and documentation only cover how to add authentication to the project and configure the @model with @auth. The fact that the auth mode has to be specified for every query or mutation is often not described in detail.
answered 4 years ago
Relevant content
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago