fix(auth): migrate from next-auth to better-auth (#1453)
This commit is contained in:
parent
453f5bb3e6
commit
b4f595a68c
40 changed files with 668 additions and 390 deletions
9
lib/client.ts
Normal file
9
lib/client.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { anonymousClient } from "better-auth/client/plugins";
|
||||
import { createAuthClient } from "better-auth/react";
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
basePath: `${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/api/auth`,
|
||||
plugins: [anonymousClient()],
|
||||
});
|
||||
|
||||
export const { useSession, signIn, signUp, signOut } = authClient;
|
||||
Loading…
Add table
Add a link
Reference in a new issue