Skip to content

Conversation

@StefanVDWeide
Copy link
Contributor

Now that Flask 2, which added Async/Await support, has been released extensions that provide decorators need to be updated in order to be used with Async/Await routes as per the documentation here

I've add the flask.Flask.ensure_sync() method to the @jwt_required decorator so that it now can be used on Async/Await routes. If this is not added, a coroutine will be returned which in turn will cause Flask to return a TypeError.

@vimalloc
Copy link
Owner

vimalloc commented Jul 5, 2021

Awesome, thanks for the PR! I'll get a new version with this released shortly 👍

@vimalloc vimalloc merged commit e099ffc into vimalloc:master Jul 5, 2021
@StefanVDWeide
Copy link
Contributor Author

Thanks @j178, should have thought of that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants