System Design · Middle · Question 14 of 75

Why use a pair of access and refresh tokens?

Explanation

Access lives for minutes and is sent with every request; refresh lives longer, is stored more securely and is used only to obtain new access tokens. Refresh token rotation makes it possible to detect reuse of a stolen token.

Further reading

Problem with a question

System Design · Middle · question 14

Test yourself

Take the System Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz