setSession()
takes in a refresh token and uses it to get a new session.REFRESH_TOKEN_REUSE_INTERVAL
which provides a short window in which the same refresh token can be used multiple times in the event of concurrency or offline issues.Refresh token to use to get a new session.
final refreshToken = supabase.currentSession?.refreshToken ?? '';
final AuthResponse response = await supabase.auth.setSession(refreshToken);
final session = res.session;