© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•14mo ago•
1 reply
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.
// 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"
"@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?
Setting up Server-Side Auth for Next.js | Supabase Docs
Setting up Server-Side Auth for Next.js | Supabase Docs
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Invalid Refresh Token: Refresh Token Not found
SupabaseSSupabase / help-and-questions
2y ago
Invalid Refresh Token
SupabaseSSupabase / help-and-questions
4y ago
Next.js - Refresh token not found
SupabaseSSupabase / help-and-questions
13mo ago
ERROR [AuthApiError: missing destination name refresh_token_hmac_key in *models.Session]
SupabaseSSupabase / help-and-questions
2mo ago