feat: add email sign up

This commit is contained in:
2025-12-11 22:32:23 +07:00
parent 8e88f6a44c
commit 7afdf84ef1
8 changed files with 192 additions and 27 deletions

View File

@@ -0,0 +1,15 @@
import { authClient } from "@/auth";
export function useAuth() {
// Better Auth 提供的 session
const session = authClient.useSession();
const user = computed(() => session.value.data?.user);
const isAuthenticated = computed(() => !!session.value.data);
return {
user,
session,
isAuthenticated,
};
}