Error getting user: { message: 'Invalid Refresh Token', status: 400 }
See original GitHub issueBug report
Describe the bug
I’m building an app with Supabase and Next.js
From time to time I’m seeing the following error in my logs:
Error getting user: { message: 'Invalid Refresh Token', status: 400 }
I’m relatively new to supabase, I don’t really understand what that means, and I’d love some help with resolving this issue.
To Reproduce
I set up the authentication by following the @supabase/auth-helpers-nextjs tutorial. I didn’t do anything weird or unusual, just followed the instructions.
According to this, it happens with all the Supabase and Next.js examples.
Expected behavior
Not getting this error.
System information
- OS: macOS
- Version of supabase-js: 1.35.4
- Version of Node.js: 16.14.2
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error 400 when refreshing short lived tokens - Google Groups
For a very small subset of users we're getting a 400 response from the API request to refresh a token. We've prompted the...
Read more >Invalid Refresh Token - API Q&A - Keap Community
I am getting the error Invalid Refresh Token I have not used it ... error":{"name":"Error","message":"Request failed with status code 400" ...
Read more >Help with 400 error on /token without an error message
I think this error started occuring once we enabled “Refresh token” as a grant type in the application settings for our React SPA....
Read more >Invalid or expired Token returns Status Code 400 (Bad Request)
This error means that the refresh token is not valid or has already been used. Do you have any concurrent requests for refresh...
Read more >Why Does Refreshing the Access Token return 400 Invalid ...
This is exactly what their documentation suggests. But it returns 400 error: invalid request. Any ideas why? Since I just want to authenticate ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @ARMATAV and @satyapalsharma going to close this issue in favour of tracking this on the gotrue-js issue.
Feel free to re-open if there are still queries or you feel that there’s merit in having this remain open though. Thanks Joel
Right you are - for future people, you can access the different variables in the container’s config itself like this https://supabase.com/docs/gotrue/server/about by passing around envars.
However, still going to bug out after
n
seconds at this point in time - but it looks like they’re going to take a shot at fixing it - very important, very fundamental functionality.https://github.com/supabase/gotrue-js/issues/323