SupabaseS
Supabase4y ago
j4

How to refresh a session in v2

Since this got merged, I can't figure out how to refresh a session. The new setSession() will only refresh your tokens if the access_token has expired. Before this merge, setSession() would give you new tokens even if the access_token was still valid.

Or am I just missing something? (the most likely scenario)

https://github.com/supabase/gotrue-js/pull/467
GitHub
What kind of change does this PR introduce?

Fixes setSession to make it safe to use in a server-side or SSR context
setSession should take in an access token and refresh token and only perform a r...
Was this page helpful?