SupabaseS
Supabase13mo ago
Damien

[ Error [ AuthApiError ]: Invalid Refresh Token: Refresh Token Not Found ]

Hey, I was going to create a GitHub Issue for this initally but then I realised this server existed! I have had a little look through other help threads and there are a couple of related threads it would seem, none are directly matching up to my situation.

I recently started a new project, using the following:

// Just for additional context.
"next": "15.1.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",

"@supabase/ssr": "^0.5.2", // where I think the issue is.
"@supabase/supabase-js": "^2.47.2", // shouldn't be having an effect here but just in case.

// Then my other packages.


I setup the authentication process according to this guide from Supabase and all was working well until yesterday when I started running into the above error locally. I had not changed anything from the guide and I had added no additional logic so I was completely lost as to why this was happening.

Furthermore, my friend, on another project but using "@supabase/ssr": "^0.3.0" had never seen the issue so I gave downgrading a go but then I was completely unable to sign in. This morning my friend tried to upgrade to match my version and he encountered the same error with the refresh token not being found.

I saw in another thread, that setting the sign-out scope to local may help as this will prevent a sign-out action from invalidating all sessions but I cannot remember signing out on any of my devices and seeing as this is only on my sign-out button, I am unsure how long it will be until this error pops up again.

I set my JWT expiry to 60 seconds and spent a good 15 minutes waiting and refreshing and trying to reproduce the bug but it has not appeared as of yet. So I have reset my JWT expiry time back to 1 hour and I am hoping for the best.

Question: Is there something glaringly obvious missing from the documentation or is this a bug and should I open a GitHub Issue?
Was this page helpful?