Loggedin User
To get the data of logged in user wherever you need, simply write one line code i.e.
const user = useAuthUser();
In the starter template, to get auth user, call useAuthUser hooks. it will return the current logged in user.
const [user, authType] = useAuthUser();
In the source, there are multiple authenticate methods like AWS, firebase, Auth0, and JWT-auth. then authType is used to check which logout method will call for logged in user.
You have to import useAuthUser from
src/@crema/utility/AppHooks.js
Last updated
Was this helpful?