Files
Zero/lib/auth-client.ts
Argenis Cuellar 15a961a8b9 feat: better-auth implementation with drizzle (#17)
* 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>
2025-02-06 20:39:45 -05:00

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();