Crema React
v-3
Search…
⌃K

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.
const {user, isAuthenticated, isLoading} = useAuthUser();
user // authenticated user object
isLoading // authentication is in progress
isAuthenticated // denote the user auth state