capless / warrant

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

Fix a bug that the boto3_client_kwargs['region_name'] will be None #84

Closed mingchouliao closed 6 years ago

mingchouliao commented 6 years ago

Fix a bug that the boto3_client_kwargs['region_name'] will be None if the user doesn't pass user_pool_region parameter to the constructor.

egranger-hummoose commented 6 years ago

I don't think there needs to be a separate argument for "user_pool_id" and "user_pool_region", since "user_pool_region" is intrinsically a part of "user_pool_id" (which is why the existing string parsing logic works). Currently it doesn't look like it's possible to move a Cognito user pool to a different region, so that logic can remain the same, and we can get rid of the "user_pool_region" kwarg.

The second change @mingchouliao made should be merged in, I'll note on the file-diff view.

This PR is for a closed branch and the changes are based on stale code; however, if rebased to master they are still relevant. I'm not sure what exactly the best workflow is here--I can pull in @mingchouliao's changes in my fork and rebase to master, then open a new PR, if that sounds good to you @bjinwright? (I think that keeps attributions correct for the original changes)

bjinwright commented 6 years ago

Sounds good @egranger-medal sorry for the delayed response. I am going to incorparte in the boto3 client kwarg.