mono/packages/ui/dist-lib/hooks/useAuth.d.ts
babayaga 7f63b07df5 lib
2026-01-20 12:14:45 +01:00

27 lines
772 B
TypeScript

import { User, Session } from '@supabase/supabase-js';
interface AuthContextType {
user: User | null;
session: Session | null;
roles: string[];
loading: boolean;
signUp: (email: string, password: string, username: string, displayName: string) => Promise<{
data: any;
error: any;
}>;
signIn: (email: string, password: string) => Promise<{
error: any;
}>;
signInWithGithub: () => Promise<{
error: any;
}>;
signInWithGoogle: () => Promise<{
error: any;
}>;
signOut: () => Promise<void>;
}
export declare const AuthProvider: ({ children }: {
children: React.ReactNode;
}) => import("react/jsx-runtime").JSX.Element;
export declare const useAuth: () => AuthContextType;
export {};