How it works without Apex
Turn on Signed sign-ins in Apex so your backend computes an HMAC-SHA256 hex digest of the user's lowercased, trimmed email using your workspace sign-in secret and passes userHash to identify(). When Require signed sign-ins is enabled, any unsigned or mismatched call is held safely so it can never overwrite an existing customer's traits, merge devices, trigger journeys, or earn partner credit.
How Apex does it for you
Apex verifies userHash on every browser and mobile identify() call, holds unverified or mismatched payloads without mutating existing contacts, flags secret-rotation mismatches on Set up Apex, and supports scoped app keys (apex_pk_) for mobile apps.
How to set this up in 5 steps
Copy your workspace sign-in secret as an admin
Open Settings, Workspace, Signed sign-ins in Apex and copy the workspace sign-in secret into your backend environment variables as APEX_SIGN_IN_SECRET. Never expose it to client code.
Compute the HMAC-SHA256 hex digest on your backend
When a user signs in, lowercase and trim their email, sign it with APEX_SIGN_IN_SECRET using HMAC-SHA256 (or signSignIn from
@apex-inc/sdk), and return the hex userHash alongside the session.Pass userHash to every identify() surface
Forward userHash in
window.apex.identify(email, traits, { userHash }),@apex-inc/sdkidentify(), Capacitor Apex.identify(), and React Native identify(). Apex never stores userHash as a trait.Use a scoped apex_pk_ app key in mobile binaries
Keep server keys and the sign-in secret off mobile devices. Configure mobile apps with an apex_pk_ app key and fetch userHash from your backend after login.
Enable Require signed sign-ins once every caller sends userHash
Roll out signing first while unsigned calls still attach, verify Set up Apex shows zero hash mismatches, then flip Require signed sign-ins on to hold unsigned calls.
Why browser identify() is spoofable
Any client-side analytics call runs inside a browser the visitor controls. Without cryptographic verification, anyone can open DevTools and run window.apex.identify("ceo@example.com") to merge their own session onto another customer's timeline, trigger lifecycle emails, or claim affiliate credit on someone else's account.
Signed sign-ins close that hole with a standard HMAC-SHA256 signature. Your backend signs the authenticated user's lowercased, trimmed email using your workspace sign-in secret, and passes the hex digest (userHash) down to the browser or mobile app. Because the secret never leaves your server, nobody can forge a valid userHash for another person's email.

How Apex handles each signature state
You do not need a flag-day cutover. Roll out signing across web and mobile first while Require signed sign-ins stays off, confirm zero mismatches on Set up Apex, and then enforce:
| Incoming identify() call | Require signed sign-ins off | Require signed sign-ins on |
|---|---|---|
| Signed, hash matches | Attached to the person | Attached to the person |
| Signed, hash does not match | Held (flagged on Set up Apex) | Held (flagged on Set up Apex) |
| Not signed | Attached to the person | Held |
A held sign-in never alters an existing contact in Apex: their devices, traits, and revenue timeline remain untouched. If the email has never been seen before, Apex keeps the new profile out of Adaptive Journeys, partner credit, and scoring until a valid signed sign-in confirms them. A signed form submit also qualifies as a verified lead for Meta and LinkedIn, even when sent from a mobile app with no website origin to inspect.
Server signing and mobile app keys
Compute userHash in one line on your server (Node, Python, or Ruby):
import { signSignIn } from "@apex-inc/sdk";
// Inside your authenticated session handler
const userHash = await signSignIn(process.env.APEX_SIGN_IN_SECRET!, user.email);Then pass userHash into whichever client surface signs the user in:
// Browser snippet
window.apex.identify(user.email, { name: user.name }, { userHash });
// TypeScript SDK
identify(user.id, { email: user.email, userHash });
// Capacitor mobile app
await Apex.identify({ email: user.email, userId: user.id, userHash });Apex checks userHash at ingest and discards it immediately; it is never saved as a contact trait.

Mobile binary hygiene: Never bundleAPEX_SIGN_IN_SECRETor a server key (apex_sk_) inside an iOS or Android app. Ship a scoped app key (apex_pk_) for app traffic and returnuserHashfrom your backend API on login. An app key can add a new contact, but it can never overwrite an existing person, count revenue, or send events to ad platforms.
What this costs on Apex
Live Apex pricing · Pay-as-you-go
Estimated Apex cost for Web and mobile SaaS app verifying 35,000 signed sign-ins per month
$0 / month
Covered by monthly free allowances.
| Apex meter / schedule | Scenario volume | Free allowance / basis | Rate | Apex cost |
|---|---|---|---|---|
Events Signed browser and mobile identify() calls (35,000 authenticated sign-in verifications per month) | 35,000 / mo | 1M / month | $5 per 100K events | $0 |
Signed sign-ins and scoped apex_pk_ app keys are built into every workspace with no security add-on charge. History: 13 months no card, 3 years with card, 7 years once you've paid an invoice. Live pricing.
Signed sign-in verification and scoped app keys are built into every workspace with zero security tier upgrade or per-verification surcharge.
