Learn how to create a Solana smart wallet using passkey authentication (Face ID / Touch ID) with Lazorkit.
Instead of seed phrases, Lazorkit uses WebAuthn passkeys (Face ID / Touch ID) to securely authenticate users.
After authentication, Lazorkit generates a smart wallet address on Solana that can hold tokens and interact with programs.
The wallet session is managed in the app, allowing users to disconnect without interacting with the portal.
Minimal Lazorkit passkey login example. One hook is enough to access the full smart wallet functionality.
import { useWallet } from "@lazorkit/wallet";
export function ConnectButton() {
const {
connect,
disconnect,
isConnected,
isConnecting,
smartWalletPubkey,
} = useWallet();
if (isConnected && smartWalletPubkey) {
return (
<button onClick={disconnect}>
Disconnect ({smartWalletPubkey.toBase58().slice(0, 6)}...)
</button>
);
}
return (
<button onClick={() => connect()} disabled={isConnecting}>
{isConnecting ? "Connecting..." : "Connect with Passkey"}
</button>
);
}