I'm trying to verify a user JWT. My current setup ...
# javascript
s
I'm trying to verify a user JWT. My current setup is a React frontend that sends the JWT over a websocket to a remote backend running Node.js. This backend communicates with Supabase along with the React frontend. The front-end works perfectly fine (I can sign up through any service, I can fetch stuff from the DB protected by auth-based RLS rules, etc). However, when I attempt to verify (both in Remix's frontend/backend and on the Node.js backend), I'm immediately met with a 401 error (
"Invalid token: token is expired by 8m21s"
). I tested this further and attempted to refresh the token only to be met with the same error but with a time of
1s
. Can anyone help in regards to why my JWTs are immediately expiring after being generated?
For reference, I'm using
supabase.auth.api.getUser()
For reference, I'm using
supabase.auth.api.getUser()
Wait a second...
hold on
So this is kind of interesting... when I first created the project on supabase, I set the token expiry to 86400 seconds (1 day)
Now after restoring the project (after it went inactive), its set to 5 seconds
Well it seems like that was the issue