Module

x/live/deps.ts>supabase.GoTrueClient#setSession

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
method supabase.GoTrueClient.prototype.setSession
import { supabase } from "https://dotland.deno.dev/x/live@1.63.12/deps.ts";
const { GoTrueClient } = supabase;

Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session. If the refresh token or access token in the current session is invalid, an error will be thrown.

Parameters

currentSession: { access_token: string; refresh_token: string; }

The current session that minimally contains an access token and refresh token.