Skip to content Skip to sidebar Skip to footer

Implementing Flask_jwt_extended With Templates Rendering

Again fighting trying to make my first flask application, this time, (after I created every I need and all works smoothly) I'm trying to protect some endpoints with flask_jwt_exten

Solution 1:

You may want to:

resp = make_response(redirect(url_for('results')))
set_access_cookies(resp, access_token)
set_refresh_cookies(resp, refresh_token)
return resp

I don't think you need this line! --> resp = jsonify({'login': True})

Took me a while to figure it out, not sure why this part is not clear in the docs, most of the examples there just returns JSON directly

Solution 2:

Also, you get same error if JWT_ACCESS_COOKIE_PATH is routed wrongly.

Post a Comment for "Implementing Flask_jwt_extended With Templates Rendering"