mirror of
https://gitbruv.vercel.app/api/git/bruv/gitbruv.git
synced 2025-12-20 23:24:09 +01:00
mvp
This commit is contained in:
parent
8f672d012c
commit
46cab693db
49 changed files with 4725 additions and 118 deletions
16
lib/auth-client.ts
Normal file
16
lib/auth-client.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { createAuthClient } from "better-auth/react";
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000",
|
||||
});
|
||||
|
||||
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]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue