Web SDK
Api reference
Hawcx Authentication SDK API Reference
Core Components
HawcxInitializer
Authentication Methods
Response Object
All authentication methods return an AuthResponse
object:
Error Codes
Code | Description |
---|---|
NOT_INITIALIZED | SDK not initialized |
INVALID_EMAIL | Invalid email format |
MISSING_OTP | No verification code provided |
OTP_VERIFICATION_FAILED | Invalid verification code |
USER_NOT_FOUND | User does not exist |
DEVICE_NOT_REGISTERED | Current device not registered |
CLIENT_ERROR | Client-side error |
EXISTING_USER | User already exists |
Code Examples
Multi device flow
In order to register multiple devices under the same user account, an additional function called
addDevice
should be called. The flow is documented below:
Fig: Step-by-step flow for registering and authenticating multiple devices for a single user account
That’s it for the API reference. We’re actively improving the SDK and have some exciting improvements coming up in future releases. Please feel free to message us on Slack for support as well as feedback.