Skip to main content
Use this checklist alongside End-to-end encryption and Encryption model and key lifecycle.

Sign-in

  • Request exactly one of e2ee:symmetric or e2ee:asymmetric, and the same one on every sign-in.
  • Request e2ee:reset only from an explicit user action, and be ready to receive the previous keys.
  • Verify the id_token and key your records by its sub.

Key handling

  • Keys arrive in the callback fragment, not in the token response. Use completeOAuthCallback, the embed’s onTokens, or mergeAppEncryptionFromUrl.
  • Remove key parameters from the URL after reading them. The SDK callback helpers do this; call stripSensitiveFragmentParams() if you parse the fragment yourself.
  • Restore + characters before decoding base64 from URLSearchParams, or use normalizeAppKeyBase64.
  • Read keys from AveSession with getAppKeyBase64(), getAppPublicKeyBase64(), and getAppPrivateKeyBase64().
  • Never send the symmetric key or the private key to your backend, analytics, error reporting, or logs.

Encryption

  • Use AES-GCM with a new random 12-byte IV for every message, and store the IV with the ciphertext.
  • For asymmetric mode, encrypt with encryptForAppHandle or encryptForAppUser and decrypt with decryptFromAppSender.
  • Handle 404 from the public-key lookup as “this person has not used your app yet”.

Identities

  • Keep a separate encrypted data domain per Ave identity. Switching identity switches key context.
  • Fail closed when a key is missing or decryption fails. Never fall back to storing plaintext, and never overwrite ciphertext you could not decrypt.
Last modified on September 28, 2026