2 Answers
- Newest
- Most votes
- Most comments
1
Despite the documentation, it doesn't seem that Amazon Cognito supports the Basic authentication scheme in the Authorization header when using Authorization Code Grant with PKCE. Once I removed the Authorization header and added the client_id and client_secret to the body (thus using client_secret_post instead of client_secret_basic, as described in the documentation), I was finally able to retrieve the token.
answered 2 years ago
0
Ensure that you decode the binary to a string by explicitly calling decode:
auth_data = base64.b64encode(f"{AMAZON_COGNITO_CLIENT_ID}:{AMAZON_COGNITO_CLIENT_SECRET}".encode()).decode()
This resolves the issue.
answered 10 months ago
Relevant content
asked a year ago
asked 4 years ago
- AWS OFFICIALUpdated 5 months ago

Ensure that you decode the binary to a string by explicitly calling
decode:This resolves the issue.