I'm seeing really short token expiration when usin...
# help
m
I'm seeing really short token expiration when using the nextjs ssr example. Like a matter of hours of inactivity. Any way to extend the life of the token or avoid this?
s
You can up the token expiration time inside of the Supabase Dashboard UI. I've been meaning to try and replicate this issue as it has been reported by multiple users now.
m
Thanks I'll give that a go for now and see if that helps!
b
After the token expires you can use the refresh_token that you received during login to renew the token
m
Do you happen to have an example of that?
b
You can refresh the token like this CURL
https://project-id.supabase.co/auth/v1/token?grant_type=refresh_token
OR JAVASCRIPT
Copy code
const { user, session, error } = await supabase.auth.signIn({
    refreshToken: ‘your-refresh-token’