Core Components

HawcxInitializer

Smart Connect Authentication Methods

Response Object

All Smart Connect authentication methods return an AuthResponse object:
{
  detail: string,         // Human-readable result message
  status: string|null,  // Operation status, e.g., "SUCCESS", "OTP_NEEDED", "INVALID_EMAIL"
  data: object|null        // Additional operation data
}

Status Codes

General & Initialization

CodeDescription
SUCCESSThe operation was successful.
NOT_INITIALIZEDSDK has not been initialized. HawcxInitializer.init() must be called first.
INITIALIZATION_FAILEDThe SDK failed to initialize, possibly due to an invalid API key or network issue.
CLIENT_ERRORAn unexpected client-side error occurred during an operation.

Smart Connect Email & OTP Flow

CodeDescription
INVALID_EMAILThe provided email address is not in a valid format.
USER_NOT_FOUNDThe email address is not registered in the system.
INVALID_OTPThe One-Time Password provided by the user is incorrect.
VERIFICATION_FAILEDThe OTP verification process failed for a reason other than an invalid OTP.
MISSING_USERNAMEThe userid (email) was not provided to the function requiring it.

Smart Connect QR Code Flow

CodeDescription
QR_TIMEOUTThe QR code was not scanned within the allowed time limit (default 2 minutes).
QR_CREATE_FAILEDFailed to create a new QR session on the server.
POLLING_FAILEDThe periodic check for a successful scan failed, possibly due to a server-side issue.
POLLING_ERRORAn unexpected client-side error occurred while checking for a scan status.
QR_INIT_FAILEDThe QR login process could not be started due to a critical client-side error.

Code Examples

The future of authentication is here – and it’s Smart Connect. We’re continuously enhancing this revolutionary technology to deliver even more intelligent authentication experiences. Join our community on Slack for support and to share your feedback!