-
Notifications
You must be signed in to change notification settings - Fork 187
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
Support new password challenge #25
Support new password challenge #25
Conversation
Cleanup README code examples
Add settings for AWS keys
0677892
to
f0209d0
Compare
Hmm, not sure why this has the renamed setting commit in there since that has already been merged into |
Tested and seems to work fine. Example: Two ways of handling this could be either to catch the exception, and then call the With that said, I'm ok with getting this initial functionality in. |
That's a really good point, and I'm working on this in a Django app so it is something to consider for sure. What would you think about raising the challenges as exceptions? Like raise a |
@ebpetway Are you talking about calling admin_get_user before the authenticate? |
Okay, I've changed the flow a bit and I think it's better now. Now users will handle the flow like this: cog = Cognito()
try:
cog.authenticate('oldpassword')
except ForceChangePasswordException:
cog.new_password_challenge('oldpassword', 'newpassword') Also, @bjinwright, if I need to do something to cleanup the commits on this PR then I can. Not sure why it says the PR has so many commits. 😕 |
That's because we had some merge conflicts that I cleaned up yesterday |
@grantmcconnaughey @ebpetway Here is the workflow I think we should go with.
What's Needed to Make it Work
|
Makes sense to me! The only downside I can think of there is that most of the time unnecessary calls to With the exception-based approach most of the time the |
I decided to merge this as is |
Cool, thanks Brian! |
This problem was raised in a number of issues such as this one: capless#29 The `set_new_password_challenge()` was introduced in the: capless#25 and is not yet documented. This should help the newcomers to get started with this module. Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.0.3 to 5.3.1. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](nedbat/coveragepy@coverage-5.0.3...coverage-5.3.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This PR adds a method to respond to the new password challenge. It is mostly based off of @stephenoneal's work at https://github.com/stephenoneal/warrant.
Fixes #22