Skip to main content

API keys

  • Use the SDK server-side only. Your web or mobile app should call your backend, never Authentica directly.
  • Never expose your API key in frontend code, including frontend-exposed variables such as NEXT_PUBLIC_*, VITE_*, REACT_APP_* and EXPO_PUBLIC_*.
  • Use environment variables or a secrets manager. Never hard-code keys.
  • Never commit API keys or .env files to source control.
  • If a key is exposed, rotate it immediately in the Authentica portal.
The SDK throws if you create a client in a browser. This is a safeguard against mistakes, not a security control: if a key was bundled into frontend code, it is already exposed.

Logging

  • Do not log OTP codes.
  • Avoid logging phone numbers or email addresses unless you need them.
  • Never log Base64 face or voice payloads.
  • Do not dump complete SDK error objects or error.errors.
  • Configure monitoring tools that record outgoing HTTP requests (such as Sentry, OpenTelemetry or Datadog) to redact the X-Authorization header and drop request bodies for Authentica calls.

Transport

  • Use HTTPS between your users and your backend.
  • The SDK requires HTTPS for the Authentica API unless you point baseUrl at a local development host.

Biometric data

Face images and voice recordings are sensitive biometric data.
  • Limit upload and request sizes in your backend.
  • Collect and keep only what you need.
  • Handle consent and retention according to your organization’s policies and the requirements that apply to you.