I enabled cognito as the only authorization mechanism (removed api key).
Following this document, I was able to enable authorization:- https://aws.amazon.com/blogs/mobile/graphql-security-appsync-amplify/
But for some reason unknown to me, i am getting the below error on postman:-
{
"errors": [
{
"errorType": "UnauthorizedException",
"message": "Unable to parse JWT token."
}
]
}
I used Bearer Token for Authorization which i generated as below :-
aws cognito-idp admin-initiate-auth --auth-flow ADMIN_USER_PASSWORD_AUTH --client-id 12345678asda9876eia --region something-west-1 --auth-parameters USERNAME=name@something.com,PASSWORD=somepass --user-pool-id something-west-1_ABCdefAmn