@narangcia-oss/cryptic-auth-client-react
Version:
React hooks and components for cryptic-auth authentication with seamless OAuth2 integration
30 lines • 837 B
TypeScript
/**
* Hook for accessing current user information and authentication state
*/
export declare function useUser(): {
/**
* Current authenticated user, null if not authenticated
*/
user: import("@narangcia-oss/cryptic-auth-client-plain-ts").AuthUser | null;
/**
* Whether the user is currently authenticated
*/
isAuthenticated: boolean;
/**
* Whether authentication state is currently being determined
*/
isLoading: boolean;
/**
* User's display name (fallback to identifier if no name available)
*/
displayName: string | null;
/**
* User's email (from OAuth info if available)
*/
email: string | null;
/**
* OAuth provider used for authentication (if any)
*/
oauthProvider: string | null;
};
//# sourceMappingURL=useUser.d.ts.map