Is my approach for JWT okay?

Posted by Coder_Koala@reddit | learnprogramming | View on Reddit | 12 comments

A. Access tokens: Short lived (5 - 15 mins), stateless (do NOT query the database, just check that signature, issuer, audience and expiration are all valid)

B. Refresh tokens: Longer lived, stateful (check if token is in some token revocation table in the database)

As you can see, I am NOT checking the database for access tokens, a I believe it should be enough to trust the signature and claims, if everything is correct.

What are your thoughts on this approach? Is it secure?