Crema React
v-4 nx
v-4 nx
  • About Crema Nx
  • Overview
    • Crema Overview
    • Dependency Graph
    • Folder Structure
      • apps
        • source
        • source-e2e
      • libs
        • components
        • constants
        • context
        • helpers
        • hooks
        • mockapi
        • modules
        • services
    • Package.json
      • MUI+CRA
      • MUI+Next.js
      • MUI+CRA+TS
      • MUI+Next.js+TS
      • Antd+CRA
      • Antd+Next.js
      • Antd+CRA+TS
      • Antd+Next.js+TS
    • GitHub Access
    • Slack Community
    • Figma File
  • Decelopment
    • Installation
    • Route Management
    • Auth User
    • Authentication Methods
    • API Calls
    • Multilingual
  • MUI
    • Theme Color
    • Sidebar Configuration
    • Navigation Style
    • Footer Configuration
    • Template Direction
    • Template Mode
  • FAQ
  • ANTD
    • About Crema Ant
    • Style Framework
  • Crema V-3 Doc
  • Servers
    • Python
    • Laravel
    • Mongoose
  • Credits
Powered by GitBook
On this page

Was this helpful?

  1. Decelopment

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 

Last updated 2 years ago

Was this helpful?