NabuCasa / pycognito

Python library for using AWS Cognito. With support for SRP.
Apache License 2.0
129 stars 39 forks source link

check_token (refresh token) error if use secret #196

Closed avanguardigit closed 1 year ago

avanguardigit commented 1 year ago

I have an error with regenerating the token after it expires, if you use an app with the secret. I pass both the username and secret parameters, but it says that

"""

 u = Cognito(COGNITO_POOL_ID, APP_CLIENT_ID, client_secret=APP_SECRET_KEY, username=email1, id_token=id_token, refresh_token=refresh_token, access_token=access_token)

u.check_token()

An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: SecretHash does not match for the client: XXXXXXXXXX """ the secret is correct because other functions such as registration or profile update work

without the secret instead it works correctly