A refresh token is a long-lived credential an app uses to get new access tokens without the user signing in again. Access tokens are short-lived for safety, and when one expires, the app presents the refresh token to the identity provider and receives a new one.

It matters because it is what keeps people signed in for days or weeks. It also matters for security, because a stolen refresh token can let an attacker keep getting new access tokens, and in some cases it remains useful after the user changes their password.

How long a refresh token works, and what makes it stop working, depends on the system's settings. Some systems rotate refresh tokens on each use, tie them to a device or revoke them when suspicious behavior is detected, while others do not. Not every sign-in flow issues one.

To limit the risk, store refresh tokens securely, set sensible lifetimes, revoke them when an account is compromised or a device is lost and use features that bind tokens to a device where your platform provides them.