Android

Mobile Auth

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

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

// Choose one of the three different palm intents
Intent intent = Pinn.generateLeftPalmAuthentication();
Intent intent = Pinn.generateRightPalmAuthentication();
Intent intent = Pinn.generateEitherPalmAuthentication();

int palmReqCode = 1234;
startActivityForResult(intent, palmReqCode);
        

Local

Intent intent = Pinn.generateFingerprintAuthentication();
int fingerprintReqCode = 4567;
startActivityForResult(intent, fingerprintReqCode);
        

Handling Authentication Results

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    switch (requestCode) {
        case leftPalmReqCode:
        case rightPalmReqCode:
        case eitherPalmReqCode:
        case fingerprintReqCode:
            if (resultCode == Pinn.Result.VERIFICATION_SUCCESS) {
                // Extract idToken for backend validation
               String idToken = data.getStringExtra(Pinn.ResultKeys.TOKEN)
            }
        break;
    }
}
        

Authentication Token

A JWT ID token is returned from a successful authentication event. Be sure to validate the token on your backend for end to end security. 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.