import type { RawUserData } from '@explorins/pers-sdk/core'; import { AccountOwnerType } from '@explorins/pers-sdk/core'; import type { UserDTO, SessionAuthContextResponseDTO } from '@explorins/pers-sdk'; export type { RawUserData }; /** * React hook for authentication operations in the PERS SDK * * Provides methods for user login, logout, token management, and authentication state. * Automatically manages authentication state and user data synchronization. * * @returns Authentication hook with methods and state * * @example * ```typescript * function LoginComponent() { * const { login, logout, isAuthenticated, user } = useAuth(); * * const handleLogin = async (token: string) => { * try { * await login(token, 'user'); * console.log('Login successful'); * } catch (error) { * console.error('Login failed:', error); * } * }; * * return ( *
Welcome, {user?.name}
* *