Hi guys, I've been following the steps in https://...
# gotrue
c
Hi guys, I've been following the steps in https://github.com/supabase/supabase/tree/master/examples/nextjs-with-supabase-auth to create my sign in and authentication, and it works very well. However, I am experiencing an error with the refresh tokens. If I set the expiry to 1 hour, the app will log out with invalid JWT error and it is not able to refresh itself with the refresh token. Can anyone help me take a look and see what is going on? *Error in terminal: * Error getting user: { message: 'Invalid Refresh Token', status: 400 } *My code is all open source, and relevant pages can be found here. * https://github.com/thex3family/make-work-fun/blob/master/utils/useUser.js https://github.com/thex3family/make-work-fun/blob/master/pages/api/auth/%5B...supabase%5D.js Really appreciate the help!
For now, my 'solution' is to extend the JWT expiry, but I don't think that's secure 😓
a
for what it's worth we have also been encountering sporadic Invalid Refresh Token errors with a similar looking auth setup. we also extended the JWT expiry but aren't thrilled with that solution either. ours is a React Native app so thought it might be related to some background/foreground behavior on iOS, but would love to hear if you identify any gotchas.
s
Hi @conrad.lin , I'm facing the same issue. Did you find a fix for this?
c
No
Unfortunately still just sticking with a week long JWT...hoping others have more success!