ERR_AUTH_TOKEN_MISSING β Auth Token Missing
HTTP Status: 401 Retryable: No Automatic retry: None. The client must provide authentication credentials.
What the User Sees
No authorization token provided. (ERR_AUTH_TOKEN_MISSING)
What Causes This Error
The API request arrived without a Bearer token in the Authorization header or a ?token= query parameter. The auth middleware in middleware/auth.ts checks for both locations before rejecting the request.
Common causes include: the user is not signed in and attempted an authenticated action, the Supabase session expired and getAccessToken() returned null before the frontend could refresh it, the frontend made an API request before the auth module finished initializing on page load, or a browser extension or proxy stripped the Authorization header.
This error can also appear in server-to-server calls if the service key is not being passed correctly. However, most server-to-server calls use the x-api-key header instead of Bearer tokens.
Resolution Steps
For Users
- Sign in to your account. If you were previously signed in, your session may have expired.
- If you are signed in and still see this error, try refreshing the page. The authentication may not have fully initialized.
- Clear your browser cache and cookies for the site, then sign in again.
- If using a VPN or proxy, verify it is not stripping HTTP headers.
- Try a different browser to rule out browser extension interference.
For Administrators
- No admin action is needed for isolated occurrences β this is normal for expired sessions.
- If users report this frequently, check that Supabase auth is configured correctly in the frontend.
- Verify the frontendβs
getAccessToken()function is correctly retrieving and passing the Bearer token. - Check that the Supabase Auth service is healthy by testing the JWKS endpoint.
- If this error spikes after a deployment, verify that the auth middleware was not accidentally modified to reject valid requests.
Related Errors
- ERR_AUTH_TOKEN_EXPIRED β Token was provided but has expired