Access keys
Delegate Tempo signing with an expiring browser key.
A Tempo access key lets an app sign with a delegated P256 key instead of requesting the root passkey for every transaction. It is a signing capability, separate from the app's HttpOnly login session.
Enable delegation
import { createFlow } from "@flow-industries/id";
import { tempoModerato } from "@flow-industries/id/chains";
const flow = createFlow({
chains: [tempoModerato],
accessKey: true,
});true uses an expiry 24 hours from initialization and strict: false. An object can set expiry to a Unix timestamp in seconds and strict to control expired-key fallback. A configured chain is required when starting login with access-key preparation enabled.
Authorization lifecycle
The browser prepares a P256 key and a Tempo KeyAuthorization before starting redirect sign-in. Its private material stays in the originating browser's IndexedDB. Only the authorization hash enters the hosted authorization flow.
When the flow requests delegation, the passkey signs the exact authorization digest in a separate WebAuthn ceremony. It is not folded into the login challenge. After returning, the SDK matches the completion to the pending login and current user, restores the credential, and saves the signed authorization alongside the local key. An email-only login cannot supply that passkey signature.
The wallet attaches the pending authorization while preparing a transaction so the chain can register the delegation. Subsequent signing uses the unexpired local key. On expiry the SDK clears that key and uses the root passkey, unless strict mode requires an expired-key error. If no key is stored at all, the root passkey remains the fallback even in strict mode.
Storage and limits
IndexedDB holds the local WebCrypto key and authorization. A non-extractable key still allows scripts running in the app's origin to request signatures, so choose an appropriate expiry and protect the app against script injection. Do not put private keys in URLs, messages to unrelated windows, or logs.
Logout clears local signing state. Clearing a browser key is not a transaction revoking an authorization already registered on-chain; that authorization has its own expiry and chain rules. Access keys cannot mint Flow session tokens or turn a guest into a registered account.
See Signing for wallet methods and Concepts for the identity/session distinction.