Skip to content

Instantly share code, notes, and snippets.

View mrantivirus's full-sized avatar
💭
Hiring!

Dennis Norton mrantivirus

💭
Hiring!
View GitHub Profile
@ziluvatar
ziluvatar / token-generator.js
Last active July 24, 2024 16:53
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');