79257285

Date: 2024-12-06 08:23:17
Score: 1
Natty:
Report link

this is due to your decorators order

@jwt_required
@app.route('/test')
def test():
return "Hello"

will return in the same Runtime error

you have to call get_current_user() after token is extracted and decoded by jwt_extended lib. a working example here Implementing roles with Flask-JWT-Extended

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: aurélien Tuffery