Before you ship
- Register an OAuth app and request
e2ee:symmetricore2ee:asymmetricin your authorize URL scope list. - Request the E2EE scope in your authorize URL (one per sign-in). Legacy apps with
supportsE2eestill work without an explicit scope. - For asymmetric mode, plan to store
app_private_keylocally andapp_public_keyon your user record.
Redirect and URL fragment
- Plaintext keys are delivered in the
#fragment, not in JSON token bodies. - Symmetric:
app_key. Asymmetric:app_public_key+app_private_key. - Normalize
+when parsing base64 fromURLSearchParams. - Use
mergeAppEncryptionFromUrl/completeOAuthCallback, thenstripSensitiveFragmentParams. AveSession:getAppKeyBase64(),getAppPublicKeyBase64(),getAppPrivateKeyBase64().
Multi-user encryption
- Look up recipients with
/api/encryption/app-lookupor SDKlookupAppPublicKeyByHandle. - Encrypt with
encryptForAppHandle; decrypt withdecryptFromAppSenderand the stored private key.
Identity isolation
- Use a separate encrypted data domain per Ave identity. Switching identity must switch key context.
