15 lines
538 B
TypeScript
15 lines
538 B
TypeScript
import { createAuthClient } from 'better-auth/react'
|
|
import { adminClient, emailOTPClient, lastLoginMethodClient } from 'better-auth/client/plugins'
|
|
import { passkeyClient } from '@better-auth/passkey/client'
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: process.env.NEXT_PUBLIC_SITE_URL || "https://localhost:3000",
|
|
plugins: [
|
|
emailOTPClient(),
|
|
passkeyClient(),
|
|
lastLoginMethodClient(),
|
|
adminClient()
|
|
]
|
|
})
|
|
|
|
export const { signIn, signOut, signUp, getSession, useSession } = authClient |