Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing Registration prodecure #32

Open
Arfius opened this issue Jan 26, 2021 · 3 comments
Open

Failing Registration prodecure #32

Arfius opened this issue Jan 26, 2021 · 3 comments

Comments

@Arfius
Copy link

Arfius commented Jan 26, 2021

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.

@nk9
Copy link

nk9 commented Nov 26, 2022

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?

@nk9
Copy link

nk9 commented Nov 26, 2022

Also, this seems to be a duplicate of #17

@pvizeli
Copy link
Member

pvizeli commented Nov 26, 2022

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?

I'm open for suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants