Skip to main content
Check out our end-to-end guide on how to implement in-app verification.

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.
await authsignal.inapp.addCredential(token: "eyJhbGciOiJ...")

Parameters

token
string
A short-lived token obtained by tracking an action.

Response

response
AuthsignalResponse<AppCredential>

Getting a credential

Get information about the in-app credential stored on the device, if one exists.
let response = await authsignal.inapp.getCredential()

Response

response
AuthsignalResponse<AppCredential>

Removing a credential

await authsignal.inapp.removeCredential()

Response

response
AuthsignalResponse<boolean>

Verifying an action

Verify an action in your app using the credential stored securely on the device.
let response = await authsignal.inapp.verify()

let token = response.data?.token

Response

response
AuthsignalResponse<VerifyDeviceResponse>