mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
* feat: better-auth implementation * feat: added signout * feat: added conditional sign in or signout button * chore: updated sign in description * feat: added conditional log in rendering * Update example.env Co-authored-by: Praash <99237795+Praashh@users.noreply.github.com> * chore: remove param * chore: lint and format * chore: rename env example file * fixes --------- Co-authored-by: Praash <99237795+Praashh@users.noreply.github.com> Co-authored-by: Nizzy <nizabizaher@gmail.com>
9 lines
286 B
TypeScript
9 lines
286 B
TypeScript
import { createAuthClient } from "better-auth/react";
|
|
|
|
const BASE_URL = process.env.BASE_URL as string;
|
|
|
|
export const authClient = createAuthClient({
|
|
baseURL: BASE_URL, // the base url of your auth server
|
|
});
|
|
export const { signIn, signUp, signOut, useSession } = createAuthClient();
|