The underlying HiyveAuth client instance for advanced use cases
Clear the current error state
Create a new MCP token. The raw token is only returned once.
Register a new OAuth client. The secret is only returned once.
Delete (soft-delete) an OAuth client by its ID.
Most recent error from any auth operation, or null
true when the user has a valid session
true during the initial auth check on mount
List all MCP tokens for the current user.
List all OAuth clients for the current user.
List all trusted devices for the current user.
Authenticate with email and password. Throws on failure.
End the current session and clear tokens.
Re-fetch the current user profile from the server.
Create a new account. Throws on failure.
Request a password reset email for the given address.
Resend the TFA one-time code. Returns the new expiry.
Resend the verification email.
Set a new password using a reset token from email.
Revoke all trusted devices. Returns the count of revoked devices.
Revoke an MCP token by its ID.
Revoke trust for a specific device by its ID.
Current authentication lifecycle status
TFA challenge details when tfaRequired is true
true when the last login attempt requires TFA verification
Authenticated user profile, or null when not logged in
Verify an email address using the token from the verification email.
Submit a TFA verification code after login triggers TFA.
Value provided by IdentityProvider to all child components.
Access this via
useIdentity()or the convenience hooksuseUser(),useAuthState(), anduseAuthActions().