Aye-Bee-See / sqlite-express-api

0 stars 0 forks source link

Logout Route #18

Open paxblueribbon opened 2 months ago

paxblueribbon commented 2 months ago

Create route for logging out, handle expiring JWT early

paxblueribbon commented 1 week ago

With JWTs this is done by blacklisting tokens, good for implementing a ban instantly instead of on expiry of token as well. Redis is a good tool for this, using expiry of items in blacklist to minimize memory usage and make more scalable.

https://medium.com/devgorilla/how-to-log-out-when-using-jwt-a8c7823e8a6