mirror of
https://gitbruv.vercel.app/api/git/bruv/gitbruv.git
synced 2025-12-20 23:24:09 +01:00
12 lines
453 B
TypeScript
12 lines
453 B
TypeScript
import { createAuthClient } from "better-auth/react";
|
|
import { getPublicServerUrl } from "./utils";
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: getPublicServerUrl(),
|
|
});
|
|
|
|
export const { signIn, signOut, useSession } = authClient;
|
|
|
|
export async function signUpWithUsername(data: { email: string; password: string; name: string; username: string }) {
|
|
return authClient.signUp.email(data as Parameters<typeof authClient.signUp.email>[0]);
|
|
}
|