forked from mosaicstack/stack
Co-authored-by: Jason Woltje <[email protected]> Co-committed-by: Jason Woltje <[email protected]>
10 lines
336 B
TypeScript
10 lines
336 B
TypeScript
import { createAuthClient } from 'better-auth/react';
|
|
import { adminClient } from 'better-auth/client/plugins';
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: process.env['NEXT_PUBLIC_GATEWAY_URL'] ?? 'http://localhost:4000',
|
|
plugins: [adminClient()],
|
|
});
|
|
|
|
export const { useSession, signIn, signUp, signOut } = authClient;
|