pycognito
pycognito copied to clipboard
Failing Registration prodecure
Hello, I got the following error during the registration procedure.
u.register(username, password) File "/site-packages/pycognito/init.py", line 350, in register self._add_secret_hash(params, "SecretHash") File "/site-packages/pycognito/init.py", line 695, in _add_secret_hash secret_hash = AWSSRP.get_secret_hash( File "site-packages/pycognito/aws_srp.py", line 201, in get_secret_hash message = bytearray(username + client_id, "utf-8") TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
The username has None value in get_secret_hash because the attribute passed via registrer function is not updating the self.username . To use the register procedure , i am passing the attribute username to the Cognito object, but this is not described in the documentation.
There are really quite a few of these "var
vs self.var
" gotchas, @pvizeli. Is it worth re-evaluating where these variables are passed in vs consulting self
and trying the normalize the way the library deals with them?
Also, this seems to be a duplicate of #17
There are really quite a few of these "
var
vsself.var
" gotchas, @pvizeli. Is it worth re-evaluating where these variables are passed in vs consultingself
and trying the normalize the way the library deals with them?
I'm open for suggestion.