iOS initialization

Configure the following settings in your initialization file for added security:

  • enforceDeviceLock

    When true, this Boolean flag requires users to set a device passcode or Face or Touch ID as a screen lock on their device. If they do not set a screen lock, the existing account information will be invalidated and they will not be able to enroll a new account until they set a screen lock.

  • clientId

    Add the client ID so SecureAuth Identity Platform recognizes that the OAuth request is from your application.

Complete the following steps to initialize the SecureAuth Mobile SDK library in your AppDelegate class.

  1. Add import SecureAuthFramework at the top of your class that implements AppDelegate.

  2. Add a variable declaration to create a SecureAuth object.

    lazy var secureAuth: SecureAuth = {
        return SecureAuth(clientId: "provided clientId", enforceDeviceLock: true)
    }()

    where:

    provided clientId is the client ID generated with assistance from SecureAuth Support, and must be passed as an initialization parameter to the SecureAuth object for use.

  3. In the UIApplicationDelegate method, application(_:didRegisterForRemoteNotificationsWithDeviceToken:), be sure to register the deviceToken to the pushToken variable.

Next steps

Account enrollment