Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deco/deps.ts>supabase.GoTrueClient#refreshSession

deco is the edge-native site editor and app framework for building dynamic, high-performance sites with a built-in visual admin UI.
Go to Latest
method supabase.GoTrueClient.prototype.refreshSession
Re-export
import { supabase } from "https://deno.land/x/deco@1.35.3/deps.ts";
const { GoTrueClient } = supabase;

Returns a new session, regardless of expiry status. Takes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession(). If the current session's refresh token is invalid, an error will be thrown.

Parameters

optional
currentSession: { refresh_token: string; }

The current session. If passed in, it must contain a refresh token.