iOS

Mobile Auth

This basic setup enables mobile-based multi-factor authentication within your application, using methods such as fingerprint reading, palm recognition, and other biometric and behavior-based authentication.

Prerequisites

Before you can complete this part of the integration make sure you have:

  • Created a Pinn User
  • Enrolled factors like devices and palms for that given user

!

Note

The Pinn SDK will return a pinnApiError if the device or biometrics that are being requested have not been enrolled.

Authentication

Different authentication factors can now be requested throughout your application and will vary based on consumer journeys. Decide which factors will be requested in coordination with the security requirements. Refer to Auth Factors for Pinn's current offering. Here are a couple examples

Palm

let onSuccess = { idToken in
     // Store idToken in order to validate on your backend
}
let onError = { error in
     // Handle error
}
Pinn.shared.authenticateWithLeftPalm(parentViewController: self,
    onSuccess: onSuccess,
    onError: onError)

Pinn.shared.authenticateWithRightPalm(parentViewController: self,
    onSuccess: onSuccess,
    onError: onError)

Pinn.shared.authenticateWithEitherPalm(parentViewController: self,
    onSuccess: onSuccess,
    onError: onError)
        

Local

let onSuccess = { idToken in
     // Store idToken in order to validate on your backend
}
let onError = { error in
     // Handle error
}

Pinn.shared.authenticateWithPasscode(parentViewController: self,
    onSuccess: onSuccess,
    onError: onError)

Pinn.shared.authenticateWithLocalBiometric(parentViewController: self,
    onSuccess: onSuccess,
    onError: onError)
        

Verifying ID Tokens

Upon successful authentication an ID token is returned to your application - typically your app would handle this token and POST the value to your apps backend, once verified your application might grant the user a session or authorize an action. For more detail regarding token validation refer to ID Tokens.

Next

Need authentication on the web? Our next section covers how our mobile client interacts with our web integration.

?

Questions?

We are here to help! Contact us with any development related questions at dev@pinn.ai and we'll reach back in a timely manner.