test(better auth): implementation start of better auth

This commit is contained in:
2025-09-19 22:23:32 -05:00
parent 6c56dfa810
commit 6faee89b25
37 changed files with 3433 additions and 16 deletions

View File

@@ -0,0 +1,11 @@
import { createAuthClient } from "better-auth/client";
import { usernameClient } from "better-auth/client/plugins";
export const authClient = createAuthClient({
baseURL: `${window.location.origin}/lst/api/auth`, // 👈 This is fine
callbacks: {
onUpdate: (session: any) => console.log("Session updated", session),
onSignIn: (session: any) => console.log("Signed in!", session),
onSignOut: () => console.log("Signed out!"),
},
plugins: [usernameClient()],
});

View File

@@ -1,6 +1,6 @@
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
return twMerge(clsx(inputs));
}