Skip to content
Discussion options

You must be logged in to vote

Can someone help me understand the combined benefit of using 3 separate things together: JWT as a session token with a database? Pros and cons?

Great question!

Advantages of using a database are you a can persist users while not logged in and generally need it for things like any service that has any sort of ordering / payment / billing, for persisting user identity while offline, persisting Access Tokens and Refresh Tokens, etc.

You would want to persist users in a database almost any time you have content a user can edit and modify, but if a site is using auth to grant read only access and no billing is involved, you likely don't need a database.

Using JWT with database gives you all …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@jayliew
Comment options

Comment options

You must be logged in to vote
3 replies
@balazsorban44
Comment options

@franky47
Comment options

@balazsorban44
Comment options

Answer selected by jayliew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants