mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
11 lines
429 B
TypeScript
11 lines
429 B
TypeScript
import { customSessionClient } from "better-auth/client/plugins";
|
|
import { createAuthClient } from "better-auth/react";
|
|
import type { auth } from "@/lib/auth"; // Import the auth instance as a type
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: process.env.NEXT_PUBLIC_APP_URL,
|
|
plugins: [customSessionClient<typeof auth>()],
|
|
});
|
|
|
|
export const { signIn, signUp, signOut, useSession, getSession, $fetch } = authClient;
|