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#setSession

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.setSession
Re-export
import { supabase } from "https://deno.land/x/deco@1.35.3/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.