Skip to content

Commit ae23514

Browse files
committed
remove logout server action
1 parent e4bb368 commit ae23514

File tree

2 files changed

+3
-34
lines changed

2 files changed

+3
-34
lines changed

autogpt_platform/frontend/src/lib/supabase/actions.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

autogpt_platform/frontend/src/lib/supabase/useSupabase.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"use client";
22
import { useCallback, useEffect, useMemo, useState } from "react";
33
import { createBrowserClient } from "@supabase/ssr";
4-
import { User } from "@supabase/supabase-js";
5-
6-
import { _logoutServer } from "./actions";
4+
import { SignOut, User } from "@supabase/supabase-js";
75

86
export default function useSupabase() {
97
const [user, setUser] = useState<User | null>(null);
@@ -42,7 +40,8 @@ export default function useSupabase() {
4240
}, [supabase]);
4341

4442
const logOut = useCallback(
45-
() => Promise.all([_logoutServer(), supabase?.auth.signOut()]),
43+
(options?: SignOut) =>
44+
supabase?.auth.signOut({ scope: options?.scope ?? "local" }),
4645
[supabase],
4746
);
4847

0 commit comments

Comments
 (0)