Use when implementing passwordless authentication, integrating WebAuthn passkeys, or enabling biometric login on SUI. Triggers on authentication implementation, passkey integration, or device biometric requirements.
From sui-dev-agentsnpx claudepluginhub first-mover-tw/sui-dev-agents --plugin sui-dev-agentsThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Passwordless authentication using WebAuthn and device biometrics.
Passkey provides:
import { PasskeyProvider } from '@mysten/wallet-standard';
async function registerPasskey(username: string) {
const provider = new PasskeyProvider();
// Create passkey credential
const credential = await navigator.credentials.create({
publicKey: {
challenge: new Uint8Array(32), // Random challenge
rp: {
name: 'My SUI App',
id: window.location.hostname
},
user: {
id: new Uint8Array(16),
name: username,
displayName: username
},
pubKeyCredParams: [{ alg: -7, type: 'public-key' }],
authenticatorSelection: {
authenticatorAttachment: 'platform',
userVerification: 'required'
}
}
});
// Derive SUI address from passkey
const address = provider.getAddress(credential);
return { credential, address };
}
async function authenticatePasskey() {
const credential = await navigator.credentials.get({
publicKey: {
challenge: new Uint8Array(32),
rpId: window.location.hostname,
userVerification: 'required'
}
});
return credential;
}
async function signWithPasskey(tx: Transaction) {
const provider = new PasskeyProvider();
// Get passkey credential
const credential = await authenticatePasskey();
// Sign transaction
const signature = await provider.signTransaction(tx, credential);
return signature;
}
function usePasskey() {
const [address, setAddress] = useState<string | null>(null);
const [isRegistered, setIsRegistered] = useState(false);
const register = async (username: string) => {
const { credential, address } = await registerPasskey(username);
// Store credential ID
localStorage.setItem('passkey_credential_id', credential.id);
localStorage.setItem('passkey_address', address);
setAddress(address);
setIsRegistered(true);
};
const authenticate = async () => {
const credential = await authenticatePasskey();
if (credential) {
const storedAddress = localStorage.getItem('passkey_address');
setAddress(storedAddress);
}
};
const signTransaction = async (tx: Transaction) => {
return await signWithPasskey(tx);
};
return { address, isRegistered, register, authenticate, signTransaction };
}
// Passkey addresses are regular SUI addresses
// No special Move code needed!
public fun create_profile(
name: String,
ctx: &mut TxContext
) {
let user = tx_context::sender(ctx); // Works with passkey!
// ...
}
❌ Not checking WebAuthn browser support
window.PublicKeyCredential before registering passkey❌ No fallback authentication method
❌ Storing credential ID without encryption
❌ Not handling "user cancelled" flow
❌ Using wrong authenticator attachment
authenticatorAttachment: 'platform' for Face ID/Touch ID❌ Not testing on multiple devices
❌ Missing user verification requirement
userVerification: 'required' for all operations❌ Not providing credential recovery flow
Query Passkey docs:
const passkeyInfo = await sui_docs_query({
type: "github",
target: "sui-core",
query: "passkey WebAuthn implementation examples"
});
Secure, user-friendly authentication with no passwords!