Refresh token

A long-lived, opaque random credential used only to get a new access token. The server stores it (here in Redis with a 30-day TTL), so deleting the key revokes it immediately.

Minimal example

text
SET refresh:{token} {user_id} EX 2592000

Learn this concept

Lesson 3.2 · JWT and refresh token rotation

Used in exercises

Exercise 3.3 · POST /v1/auth/*: signup, login and refresh Exercise 3.22 · POST /v1/auth/refresh: detect token reuse
Prerequisite conceptsAccess token