In my current architecture I have an authentication server which provides a JWT token via OpenID Connect to any web application that uses the code flow I implemented.
I went to the hassle of implementing OpenID Connect (mainly thanks to authlib) to let the authenticated web applications being stateless. It also allows me to make requests between apps without reauthenticating users, by passing my JWT around. Thats very handy...
Now I am facing the following problem : If one of the said web application wanted to refresh their token instead of going through the whole code flow again, they would need to store a refresh token somewhere in the backend, where it is secured.
Sadly this would break the stateless authentication I was looking for, which forces me to mount some sort database on each one of my web applications that initially didn't need any.
Is there a way to refresh a JWT in a stateless way ? Or, to rephrase my question, where can I store my refresh token in a stateless application ?