Access the full identity context including auth state, user data, and all actions.
The complete IdentityContextValue with state, user, and action methods.
Error if called outside of an IdentityProvider.
function Dashboard() { const { user, isAuthenticated, logout } = useIdentity(); if (!isAuthenticated) return <p>Please log in</p>; return <button onClick={logout}>Logout {user?.email}</button>;} Copy
function Dashboard() { const { user, isAuthenticated, logout } = useIdentity(); if (!isAuthenticated) return <p>Please log in</p>; return <button onClick={logout}>Logout {user?.email}</button>;}
Access the full identity context including auth state, user data, and all actions.