You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an app pool with a client secret and either I'm doing something wrong, or i've uncovered an issue with the register() method when requiring a client secret.
The instructions for instantiating the Cognito object for register do not include the username parameter (which makes sense, since you are trying to create one). So self.username is None.
However, the register method calls:
self._add_secret_hash(params, 'SecretHash')
which if you follow the tree is trying to hash self.username + client id + client secret.
BEFORE it creates the user, so it throws a null reference exception.
I think that the readme needs to state that if you have a client secret, you need to include the username when you instantiate Cognito (or alternatively, modify the implementation to populate the self.username from the one passed in on the register() method BEFORE trying to add secret hash.
The text was updated successfully, but these errors were encountered:
I have an app pool with a client secret and either I'm doing something wrong, or i've uncovered an issue with the register() method when requiring a client secret.
The instructions for instantiating the Cognito object for register do not include the username parameter (which makes sense, since you are trying to create one). So self.username is None.
However, the register method calls:
self._add_secret_hash(params, 'SecretHash')
which if you follow the tree is trying to hash self.username + client id + client secret.
BEFORE it creates the user, so it throws a null reference exception.
I think that the readme needs to state that if you have a client secret, you need to include the username when you instantiate Cognito (or alternatively, modify the implementation to populate the self.username from the one passed in on the register() method BEFORE trying to add secret hash.
The text was updated successfully, but these errors were encountered: