useUser
Retrieve the current authenticated user.
Thin wrapper over useSession that returns session.data?.user as data. It shares the session cache entry and does not make an extra request.
Usage
import { useUser } from "@better-auth-ui/solid"
const user = useUser(authClient)
const email = () => user.data?.emailAccepts the same options as useSession.
Last updated on