Out-of-band Authentication: JavaScript Web SDK

HYPR SDK for iOS: Web Authentication

🚧

DO THIS FIRST

Before proceeding with this document, please ensure that you've followed the steps in Configuring Push Notifications via Firebase and Enable Push Notification for iOS.

This document details how to use out-of-band (OOB) authentication to login to a web account.

OOB authentication provides the means to login to a web account on a browser via your mobile device.

The first step is to pair your mobile device with your web account via OOB Device Setup. After performing OOB Device Setup, you can login via OOB authentication, which does the following:

  1. Sends push notifications to mobile devices paired to the web account.
  2. Mobile Device opens the push notification and is prompted to authenticate. Upon successful authentication, the web account is unlocked.

OOB Device Setup

1412

iOS OOB Device Setup PIN Entry Screen

1242

OOB Authentication

This is the mechanism that unlocks the web account.

1467

UI Customization

By default, the OOB Device Setup screen is an Alert View Controller that accepts a PIN.

1242

If you are creating your own OOB Device Setup screen, you must create a view controller that accepts the 6-digit pin. Once you have that PIN, you must provide it to the HYPRUserAgent registerRemoteDevice method.

class YourCustomOutOfBandDeviceSetupViewController: UIViewController {
  func outOfBandDeviceSetup() {
    HYPRUserAgent.setParentViewController(self)
    HYPRUserAgent.sharedInstance().registerRemoteDevice(forUser: nil, pin: "<Pass the PIN here>", actionId: "<your policy name goes here>") { error in
      if let error = error {
        // Handle Error
        print(error)
      }
      else {
        // Out of Band Device Setup is successful
        print("Out of Band Device Setup Successful!")
      }
    }
  }
}