Experience revolutionary passwordless authentication powered by Hawcx Smart Connect technology
Transform your web application with Smart Connect - the most intuitive passwordless authentication ever created. Just four simple function calls deliver enterprise-grade security with consumer-grade simplicity.Note: The Hawcx Web SDK featuring Smart Connect is currently available as a public beta. We’re actively enhancing this revolutionary technology—your feedback helps us shape the future of authentication!
import { HawcxInitializer } from "https://websdkcdn.hawcx.com/hawcx-auth.esm.min.js";const auth = await HawcxInitializer.init('YOUR_API_KEY');
Replace 'YOUR_API_KEY' with your actual API key obtained from Hawcx.
2
Implement Smart Connect Authentication
Copy
// One intelligent method handles everything - no more Sign Up vs Sign In confusion!auth.authenticate('[email protected]').then(response => { if (response.status === "SUCCESS") { // Smart Connect instantly authenticated known user on trusted device const token = response.data; // User is logged in - navigate to app // ... } else if (response.status === "OTP_NEEDED") { // Smart Connect requires verification for new user/device const deviceToken = response.data; // Show OTP input screen // ... } else { throw Error(`Authentication failed: ${response.message}`) }});// When Smart Connect needs verificationauth.verify({ otp: "YOUR_OTP", deviceToken: deviceToken, userid: "[email protected]"}).then(response => { if (response.status === "SUCCESS") { // Smart Connect authentication complete! const accessToken = response.data; // User is now authenticated // ... } else { throw Error(`Verification failed: ${response.message}`); }});
Congratulations! You’ve now enabled revolutionary Smart Connect passwordless authentication in your web application. Your users will enjoy the future of authentication - intelligent, seamless, and secure.Pro Tip: Implement Smart Connect QR code support to enable seamless cross-platform authentication between web and mobile.For complete API details, refer to the Smart Connect API Reference.Note: To prevent CORS errors when testing locally, make sure to run your frontend on one of the following common ports: