const {
data: session,
isPending, //loading state
} = authClient.useSession();import { createAuthClient } from "better-auth/react"
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_APP_URL, // the base url of your auth server
})
export const { signIn, signOut, useSession, getSession } = authClient;
