Adding a QR code 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.
A formatted error code which may additionally be present if the SDK call encountered an error.
Possible values are: token_not_set, expired_token or network_error.
A formatted error code which may additionally be present if the SDK call encountered an error.
Possible values are: invalid_credential when the credential exists on the device but has
been removed from the server.
An unstructured error description present if the SDK call encountered an error. This could
occur if the credential on the device is no longer valid because the corresponding user
authenticator has been deleted in the Authsignal Portal.
When the user scans the QR code, you should call claimChallenge to set the user attempting to complete the challenge.
This will return some context about the desktop or kiosk device initiating the challenge such as ip address, location, user agent and custom data.
This data can be shown to the user to help them decide if they want to approve or decline the challenge.
An unstructured error description present if the SDK call encountered an error. This could
occur if the credential on the device is no longer valid because the corresponding user
authenticator has been deleted in the Authsignal Portal.
An unstructured error description present if the SDK call encountered an error. This could
occur if the credential on the device is no longer valid because the corresponding user
authenticator has been deleted in the Authsignal Portal.
When adding a credential for QR code verification, it is possible to require that the user authenticate via their OS biometrics or PIN whenever they access the credential (e.g. when approving or rejecting a challenge).
The timeout param determines the time (in seconds) that the credential can be accessed after authenticating - or 0 if authentication must occur for every credential use.
The authorizationType param determines if authentication is required via biometrics and/or device credential (e.g. pin).If user authentication is required for a credential, you must call updateChallenge in a biometric prompt authentication callback.
Initialize a signature before displaying the biometric prompt
val signature = authsignal.push.startSigning()val cryptoObject = CryptoObject(signature)// Initialize biometric prompt and prompt infoval biometricPrompt = ...val promptInfo = ...biometricPrompt.authenticate(promptInfo, cryptoObject);
Retrieve the signature from the crypto object in your prompt’s authentication callback
override fun onAuthenticationSucceeded(result: AuthenticationResult) { super.onAuthenticationSucceeded(result) val cryptoObject = result.cryptoObject val signer = cryptoObject.signature authsignal.push.updateChallenge( challengeId = challengeId, approved = true, signer = signer )}