passkeyAccount | any | storedState.passkeyAccount | - |
sessionKey | any | storedState.sessionKey | - |
isAuthenticated | boolean | storedState.isAuthenticated | - |
hasPasskeySupport | boolean | storedState.hasPasskeySupport | - |
sessionSecrets | SessionSecrets | - | - |
isLoading | any | - | - |
loadingOperation | any | - | - |
error | any | - | - |
errorCode | any | - | - |
sessionStatus | PasskeySessionStatus | - | - |
sessionExpiresAt | number | - | - |
ensureValidSession() | () => Promise<void> | - | Ensure the passkey session is valid and ready for use |
checkSupport() | () => Promise<boolean> | - | Check if browser supports passkey authentication |
hasLocalPasskeyAccount() | () => boolean | - | Check if user has already created a passkey account on this device Uses localStorage to track created accounts |
createAccount() | (params) => Promise<void> | - | Create a new passkey account (signup flow) This method performs the complete passkey account creation: 1. Generates session key for signing 2. Creates passkey session with the API 3. Prompts user for biometric authentication (WebAuthn) 4. Creates both passkey account and smart account 5. Stores account and session data |
authenticate() | (params) => Promise<void> | - | Authenticate with an existing passkey (login flow) This method performs passkey authentication: 1. Generates session key for signing 2. Creates authorize session with the API 3. Prompts user for biometric authentication 4. Finds existing passkey account 5. Stores account and session data |
logout() | () => void | - | Log out and clear all stored passkey authentication data Clears all browser storage (localStorage and sessionStorage) and disconnects the account from the SDK context. Note: You can also use useAccount().disconnect() directly for the same behavior. |
clearError() | () => void | - | Clear error state |