Automatically including the JWT in requests


I’m using auth0 with Python and Flask. I’ve figured out how to have a user login and then save the resulting JWT.

What I want to do now is automatically have the JWT included with every request the user makes to the API while they are logged in. Does anyone know how to accomplish this?

I suppose I could save the JWT in the session object instead of doing it this way and having it included in requests but that seems a bit less secure?



Hi @p.christodoulou2,

You shouldn’t need to request a new token every time you make an API call. You can keep the token in your secure backend until it expires then request a new one.

Let me know if I am misunderstanding something.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.