push namespace. If you’re implementing QR code or in-app verification, replace push with qr or inapp.
When to enroll
App verification enrollment for users is typically an invisible process which happens automatically when they’re signed in to your mobile app. Your app uses one of our Mobile SDKs to generate a cryptographic device credential and bind it to an authenticated user. The recommended place to enroll users by adding a device credential is within a post-authentication handler. This handler should be triggered in the following two scenarios.- Immediately after the user signs in to the app.
- When the app is launched and the user is already authenticated (e.g. due to a persistent session).
Handling app updates
A common question is how to enroll users who are already signed in and just received an app update that introduces app verification. The post-launch handler shown above covers this scenario automatically. No separate flow is required. When an existing authenticated user opens the updated app for the first time:- The post-launch handler runs because the user’s session is still valid.
getCredentialreturns no credential (since the device hasn’t been enrolled yet on this version).- A new device credential is silently enrolled via
addCredential.
getCredential short-circuits and no re-enrollment occurs, so the flow is safe to run on every launch.

