auth-helpers
auth-helpers copied to clipboard
NextJS - Invalid Refresh Token
On the latest release, using purely the example in examples/nextjs, after the exp time elapses, I'm getting the following error.
How can I make sure that the automatic token refresh fires off properly?
(Local development via supabase start and its associated container(s))
Scratch that, this is with any and every example using NextJS and Supabase, with or without auth-helper. Very weird behavior.
@ARMATAV Do you know if there has been any updates about this?
@ARMATAV Do you know if there has been any updates about this?
None so far - just a bunch of closed issues surrounding it; perhaps they deprioritized in favor of something else.
Facing a similar issue where the users get signed out after the expiry time, upon debugging seems the refresh token fails with the Invalid Refresh token in logger.
This seems to be in a recent update. Im lowered my auth-helpers-nextjs to 0.2.1 from 0.2.5 and this worked as expected
Tried downgrading to 0.2.1, and even though I didn't get Invalid Refresh Token error message, still the token doesn't get refreshed and it logs JWT expired
Any solution to this yet?
I'm guessing does not work with supabase-js@next (1.36.0-next.17)?
https://supabase.com/blog/supabase-js-v2
This solves the “getting logged out” issue, which has been a recurring challenge in our GitHub Discussions.
Should be good to go here now, right?
I've seen @thorwebdev reference #92 as resolving this issue but it still seems to be present.
I'm using supabaseServerClient on an unsecured /api endpoint, and every now and then I get the error JWT expired unless I hit a client-side route which refreshes the token.
I've tried with @latest and @rc of supabase-js and related packages:
"@supabase/auth-helpers-nextjs": "^0.2.7",
"@supabase/auth-helpers-shared": "^0.1.3",
"@supabase/supabase-js": "^2.0.0-rc.8",
Edit: Updated package versions to reflect latest attempt state.
The next release should make this more robust. You can already try it out with installing npm install @supabase/auth-helpers-nextjs@next and you can find the migration guide here: https://github.com/supabase/auth-helpers/blob/next/packages/nextjs/MIGRATION_GUIDE.md#migrating-to-03x