capless / warrant

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

Fix for using email field as username for authenticate() in AWSSRP. #107

Closed anyeone closed 6 years ago

anyeone commented 6 years ago

Hi, I have my userpool configured to use email as the username. However, when I try to authenticate users with Warrant, I can only do so successfully if I use the guid username. I get an error using the email address.

anyeone commented 6 years ago

AWS Support says only a single line change is needed to fix this, the issue is actually a mismatch between the calculated hash and yours because theirs is using the sub unless you tell it otherwise:

Right after this line highlighted in the link below, add challenge_response['USERNAME'] = self.username https://github.com/capless/warrant/blob/develop/warrant/aws_srp.py#L209

bjinwright commented 6 years ago

Ticket moved to Warrant-Lite #1