An error occurred calling InitiateAuth operation: Unable to verify secret hash for client
See original GitHub issueHi,
I’m trying to use the package using the example you provide… but it doen’t work, what I’m doing wrong?
from warrant import Cognito
POOL_ID = 'eu-central-1_J1HZ86xLX'
APP_ID = '23o6vbtasvacvd7f567go7svfk'
USERNAME = 'user1'
PASSWORD = '@perw1fg'
ACCESS_KEY = 'AKIAI5WPBLQZAQFPLGGQ'
SECRET_KEY = '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'
u = Cognito(POOL_ID, APP_ID, username=USERNAME, user_pool_region='eu-central-1')#, access_key=ACCESS_KEY, secret_key=SECRET_KEY)
u.authenticate(password=PASSWORD)
The settings are fake 😉
The error message is the following:
Traceback (most recent call last):
File "./warrant-test.py", line 20, in <module>
tokens = aws.authenticate_user()
File "/usr/local/lib/python2.7/site-packages/warrant/aws_srp.py", line 187, in authenticate_user
ClientId=self.client_id
File "/Users/m2tz/Library/Python/2.7/lib/python/site-packages/botocore/client.py", line 253, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Users/m2tz/Library/Python/2.7/lib/python/site-packages/botocore/client.py", line 557, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.NotAuthorizedException: An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: Unable to verify secret hash for client 23o6vbtasvacvd7f567go7svfk
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Resolve Amazon Cognito “Unable to verify secret hash for ...
When a user pool app client is configured with a client secret in the user pool, a SecretHash value is required in the...
Read more >Unable to verify secret hash for client in ... - Stack Overflow
But I always get error saying "Error: Unable to verify secret hash for client 4b*******fd". Here is code: AWS.config.region = 'us-east-1'; // Region...
Read more >Unable to verify Secret Hash For Client AWS Error | bobbyhadz
The "Unable to verify Secret Hash for Client" error occurs in Cognito and Amplify requests when the App client of a User pool...
Read more >Unable to verify secret hash for client _xxxxxxxxx_ [#3211026]
Problem/Motivation 1. Installed Cognito on a D8.9.14 site. 2. Set up my settings.php file. 3. use a user/password pair from cognito (never ...
Read more >TIP: Using AWS Cognito User pool for API Authorization
An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: Unable to verify secret hash for client.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please, update the documentation, it would be nice know about this at the “Getting started” stage.
Try this answer which I posted in stackoverflow. It mention how to create
SECRET_HASH
in python without uncheckGenerate client secret
when creating an app.solution - https://stackoverflow.com/questions/37438879/unable-to-verify-secret-hash-for-client-in-amazon-cognito-userpools/56581239#56581239