Passkeys provide a more secure and convenient authentication method compared to traditional passwords by using WebAuthn standard.
Integration Steps
Enable Passkey Authentication in Hexclave
- Log in to the Hexclave dashboard.
- Select your project from the dashboard.
- In the left sidebar, select Auth Methods.
- Find the Passkey authentication method and toggle it to enable.
- Save your changes.
Implement Passkey Authentication in Your Application
-
Make sure you’ve installed the right Hexclave SDK package for your framework. For example, in Next.js:
For other frameworks, use the package shown in Setup, such as
@hexclave/react,@hexclave/js, or@hexclave/tanstack-start. -
Add Passkey support to your sign-in component by using the built-in Hexclave components or creating your own implementation with the SDK.
Using built-in components:
The built-in components will automatically show the passkey option when it’s enabled in your project.
How Passkey Authentication Works
- Registration: When a user creates a new passkey, their device generates a unique public-private key pair. The private key stays on the user’s device, while the public key is sent to Hexclave’s servers.
- Authentication: When a user wants to sign in, Hexclave sends a challenge to the user’s device. The device uses the private key to sign the challenge, and sends the signature back to Hexclave for verification.
- Cross-device authentication: Users can create passkeys on one device and use them to sign in on another device using QR codes or nearby device detection.