Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

What if the refresh token is compromised

Open
#923 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
node.js

Research direction

The issue names no files, tests, or code entry points; it asks for a conceptual explanation of compromised JWT refresh tokens. Start by reviewing the project's JWT usage and relevant authentication guidance, then document a clear answer describing what should happen when a refresh token is stolen.

Written by the indexing model from the issue text.

Description

As far as I understand a JWT token has two parts

  1. access token (short validity)
  2. refresh token (long validity)

The purpose of keeping the access token short lived is if it gets compromised, the user will not be access the resource after its expiry.

The purpose of keeping the refresh token long lived is if the access token gets expired, the refresh token can then be used to generate a new access token OR increase the expiry time of the access token.

My question is, what if the refresh token gets compromised? In that case what is the whole point of keeping the access token short lived? Because the hacker can then keep reissuing a new access token each time it gets expired using the stolen refresh token.

Can someone explain to me please?

Dominant language
JavaScript
Stars
18.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from auth0/node-jsonwebtoken

All issues in auth0/node-jsonwebtoken

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.