-
-
Notifications
You must be signed in to change notification settings - Fork 513
reset_password: handle JSON requests (#453) #836
Conversation
Fixes AttributeError when running test_custom_change_url and test_without_babel.
Fixes AttributeError: 'EnvironBuilder' object has no attribute 'find' when using REQUIREMENTS=lowest.
This will hopefully help debug the weird E AssertionError: assert 1 == 0 E + where 1 = <Result InvalidRequestError('When initializing mapper mapped class User->user,...ss \'conftest.User\'> class after both dependent classes have been defined.',)>.exit_code in test_cli_addremove_role with pypy2.
@lnielsen Could you please take a look at this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did something similar in:
https://github.com/jwag956/flask-security which is my fork.
I was solving the issue of a single-page-application which a) uses JSON api and b) needs redirect URls that are in fact API requests (not rendered HTML).
Since reset_password USUALLY comes in as a GET from an email confirmation - I needed to add redirect URLs/APIs.
I found your PR since I am getting my fork to build and hooked up to travis CI etc. And you have fixed a few other issues (thanks)!.
@jwag956 this is my use case as well. Apparently quite a few people needed that in the past too, so I've decided to revive this topic. @jirikuncar, @lnielsen, Gentle ping. |
You can see my changes at: https://github.com/jwag956/flask-security/commits/develop Also - in an effort to kickstart flask-security and get a release cadence going - I have formalized my fork - it is up on pypi, travis, readthedocs as flask-security-too. My plan is to pick up obvious/easy already merged PRs from 'develop' branch to get started. Then improving my changes for json/APIs and getting those in. |
I have merged my fix to this and confirmation, passwordless login that handle the case you are working on as well as other. In particular, for single-page-applications - the UI needs control on the GET on the reset password link. This will be part of my 3.2.0 release. please see: Flask-Middleware/flask-security#81 I will have this up on pypi as a rc candidate in a day or so. |
That sounds really good, thanks! I will give it a try once it's on pypi. |
@mephi42 It is now available as 3.2.0rc1 at: |
Co-authored-by: Chris Wagner <jwag.wagner@gmail.com>
Another stab at #468 and #535.