Crema React
v-4 Next.js
Search
K
Comment on page

Auth User

In the Crema if you want to get the currently authenticated user. You need to call the useAuthUser hook and you will get the auth user like below.
In the Crema, if you want to get the currently authenticated user. You need to call the useAuthUser hook and you will get the auth user like below.
import { useAuthUser } from '@crema/hooks/AuthHooks';
const {user, isAuthenticated, isLoading} = useAuthUser();
user // authenticated user object
isLoading // authentication is in progress
isAuthenticated // denote the user auth state