This error occurred during local testing, when returning to a tab that had been open all night. The local dev server had also been restarted. As a result of this, the dashboard was displayed, but without the components that required user data. It would be better to handle this error and redirect to the landing/login page.
This error may not occur in a production environment.
AuthApiError: Invalid Refresh Token: Already Used
at handleError (webpack-internal:///(rsc)/./node_modules/@supabase/gotrue-js/dist/main/lib/fetch.js:36:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async _handleRequest (webpack-internal:///(rsc)/./node_modules/@supabase/gotrue-js/dist/main/lib/fetch.js:84:9)
at async _request (webpack-internal:///(rsc)/./node_modules/@supabase/gotrue-js/dist/main/lib/fetch.js:63:18)
at async eval (webpack-internal:///(rsc)/./node_modules/@supabase/gotrue-js/dist/main/GoTrueClient.js:1422:24)
at async eval (webpack-internal:///(rsc)/./node_modules/@supabase/gotrue-js/dist/main/lib/helpers.js:226:36) {
__isAuthError: true,
status: 400
}
Reloading the page fixes this while remaining logged in, apparently by using a new refresh token. Maybe this can be fixed on the server by retrying the failed request?
Background
This error occurred during local testing, when returning to a tab that had been open all night. The local dev server had also been restarted. As a result of this, the dashboard was displayed, but without the components that required user data. It would be better to handle this error and redirect to the landing/login page.
This error may not occur in a production environment.