chore: scaffold turbo monorepo with hono api and react admin web
This commit is contained in:
11
apps/web/src/lib/auth-client.ts
Normal file
11
apps/web/src/lib/auth-client.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { createAuthClient } from 'better-auth/react'
|
||||
|
||||
/**
|
||||
* BetterAuth browser client. `baseURL` points at the Hono API, which mounts
|
||||
* BetterAuth under `/api/auth/*`.
|
||||
*/
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: import.meta.env.VITE_API_URL ?? 'http://localhost:3000',
|
||||
})
|
||||
|
||||
export const { signIn, signUp, signOut, useSession } = authClient
|
||||
Reference in New Issue
Block a user