Check out our end-to-end guide on how to implement in-app
verification.
Credential storage modes
In-app credentials can be stored either as a single credential for the device or as separate credentials per username. If you do not pass ausername when adding, getting, removing, or verifying with an in-app
credential, the SDK uses one credential for the device. This is useful for step-up verification when
the current signed-in user is the only user expected to use the device credential. If a different
user later adds an in-app credential on the same device without a username, the credential is rebound
to that user.
If you pass a username, the SDK stores and looks up a credential scoped to that username. This lets
multiple users sign in on the same device without removing each other’s in-app credentials. Use the
same username when calling addCredential, getCredential, removeCredential, and verify.
PIN methods always require a username, because each PIN is associated with a username on the
device.
Adding a credential
Adding an in-app credential generates a private/public key pair, where the private key is secured on the user’s mobile device and the public key is held by Authsignal. This operation must be authorized with a short-lived token, which can be obtained by tracking an action from your backend in an authenticated context.Parameters
A short-lived token obtained by tracking an
action.
An optional username used to store a separate in-app credential for this user on the device. Omit
this value to use a single device credential.
When set to
true, the SDK will generate a platform-specific attestation during enrollment:- iOS: Uses App Attest (DCAppAttestService) to generate an attestation bound to the device.
- Android: Uses Play Integrity to generate an integrity token.
Response
Getting a credential
Get information about the in-app credential stored on the device, if one exists.Parameters
An optional username used to look up a credential scoped to that username. Omit this value to look
up the single device credential.
Response
Removing a credential
Parameters
An optional username used to remove the credential scoped to that username. Omit this value to
remove the single device credential.
Response
Verifying an action
Verify an action in your app using the credential stored securely on the device.Parameters
An optional username used to verify with the credential scoped to that username. Omit this value
to verify with the single device credential.
Response
Creating a PIN
Create a custom PIN backed by a cryptographic in-app credential stored securely on the user’s device.Parameters
A short-lived token obtained by tracking an
action.
The username associated with the PIN. A device can have multiple PINs stored for different users.

