While creating/assigning the JWTs to users, should we also store them in our databases?
The negatives/cons of storing tokens in database would be, that all the data in the payload of the JWT token is already stored in the database, hence storing the token will storing the redundant data, also the verification of JWTs happens through the signature keys which do not change for a longer period of time but,
The positives/pro I can see of storing the JWT token in our database would be that even after assigning the token we will have the power to invalidate or deactivate the existing the tokens even before the expiry.
One of the use-cases for storing the tokens would be that tokens will be invalidated when there is an update in the auth scheme and all the old tokens have to be invalidated.