This addresses #66 by only adding TemporaryPassword conditionally to additional_kwargs. I've verified that Cognito is now successfully creating the user, and also generating a compliant password when admin_create_user is called with no temporary_password parameter, and also when temporary_password is None.
Two details:
If the user happened to pass both TemporaryPassword in the additional_kwargs dictionary and also the temporary_password parameter, then this value would be overridden. However, I'm not sure what a user would expect to happen in that case. It seems reasonable to coalesce the values, and we have to choose one of them anyway.
The user can also pass an empty string, since that's falsy in Python. Indeed, I've left the default argument value alone for this reason.
This addresses #66 by only adding
TemporaryPassword
conditionally toadditional_kwargs
. I've verified that Cognito is now successfully creating the user, and also generating a compliant password whenadmin_create_user
is called with notemporary_password
parameter, and also whentemporary_password
isNone
.Two details:
TemporaryPassword
in theadditional_kwargs
dictionary and also thetemporary_password
parameter, then this value would be overridden. However, I'm not sure what a user would expect to happen in that case. It seems reasonable to coalesce the values, and we have to choose one of them anyway.