Supabase Refresh Token Not Found Error

Supabase error refresh_token_not_found (refresh_token_not_found) explained: what it means, why it happens, and how to fix it — with copy-paste code examples.

Error code refresh_token_not_found Supabase Last verified 2026-08-19

Quick Answer

Force the user to sign in again - the session can no longer be refreshed. If that does not apply, handle SIGNED_OUT from onAuthStateChange and redirect to login — the full checklist is below.

Error Code

Error code: refresh_token_not_found
Official name: refresh_token_not_found
Service: Supabase

What does this error mean?

Session containing the refresh token not found.

Common Causes

How to Fix

  1. Force the user to sign in again - the session can no longer be refreshed
  2. Handle SIGNED_OUT from onAuthStateChange and redirect to login
  3. Never store refresh tokens outside the SDK's secure storage
  4. Treat refresh_token_already_used separately: token reuse triggers revocation

Code Examples

Recover from an unrecoverable session javascript
const { error } = await supabase.auth.getSession()
if (error?.code === 'refresh_token_not_found') {
  await supabase.auth.signOut({ scope: 'local' })
  window.location.href = '/login'
}

Once the refresh token is gone the session is unrecoverable - a clean local sign-out avoids stuck UI state.

Framework-Specific Fixes

supabase-js

Catch the code and clean up local state before redirecting to login.

const { error } = await supabase.auth.refreshSession()
if (error?.code === 'refresh_token_not_found') {
  await supabase.auth.signOut()
  redirectToLogin()
}

You Might Also Like

Frequently Asked Questions

Why am I seeing Supabase error refresh_token_not_found?

Most often this happens when refresh token rotated (single-use) and then reused, or when user signed out on another device, revoking the session.

How do I fix Supabase error refresh_token_not_found?

Force the user to sign in again - the session can no longer be refreshed.

Which frameworks have documented fixes for error refresh_token_not_found?

This page documents fixes for: supabase-js.

Official Sources

This page is based on the official Supabase documentation linked below and adds practical troubleshooting guidance on top.