Futurae iOS Mobile Auth SDK (FTMobileAuthSDK)

Installation

FTMobileAuthSDK is currently only available through this git repository. To install it, simply add the following line to your Podfile:

pod 'FTMobileAuthSDK', :git => 'git@git.futurae.com:futurae/mobile-auth-ios-sdk.git', '~> 0.1.0'

Example Project

An example project can be found here, which also includes TODO comments to indicate where actions are required and demonstrates how the SDK communicates with the application.

The following steps are required to run the example project:

  1. Install CocoaPods.
  2. Clone the repo, and run pod install from the Example directory.
  3. Configure the SDK by modifying the FTMobileAuthSDK-Info.plist file according to your Futurae setup. See the FTConfig docs for examples.
  4. Integrate the Futurae Auth API with your backend such that you can start a new mobile_auth factor and retrieve a SessionToken.
  5. Register the correct Service URL and App IDs according to the Futurae Auth API reference docs.
  6. Build and run the example project.

Usage

To include MobileAuth in your own app, follow these steps:

  1. Install the FTMobileAuthSDK pod according to the installation instructions.
  2. Configure the SDK by modifying the FTMobileAuthSDK-Info.plist file according to your Futurae setup. See the FTConfig docs for examples.
  3. Integrate the Futurae Auth API with your backend such that you can start a new mobile_auth factor and retrieve a SessionToken.
  4. Register the correct Service URL and App IDs according to the Futurae Auth API reference docs.
  5. Make sure that all MobileAuth related URL Scheme calls are forwarded to the FTMobileAuthManager. See the FTMobileAuthManager docs for an example.
  6. Implement all delegate methods of the FTMobileAuthManagerDelegate and register the responsible ViewController as the delegate:

    [FTMobileAuthManager sharedManager].delegate = self;
    
  7. To start a new MobileAuth session, perform the corresponding Futurae Auth API call to retrieve a SessionToken. Once you have the SessionToken, forward it to the FTMobileAuthManager like this:

    [[FTMobileAuthManager sharedManager] start:self.sessionToken]
    
  8. The FTMobileAuthManager now automatically handles the MobileAuth session and reports the status to the corresponding FTMobileAuthManagerDelegate method. Check the FTMobileAuthManagerDelegate docs or the example project to see how the delegates should be handled.

MobileAuth Enrollment

When a user tries to use MobileAuth for the first time, a new MobileAuth client needs to be enrolled first. If this is the case, the mobileAuthManagerEnrollmentRequired delegate is called and the enrollment can be initiated as follows:

[[FTMobileAuthManager sharedManager] enroll:self.sessionToken];

For demo purposes it may be useful to delete the MobileAuth client, for example to restart the enrollment:

[[FTMobileAuthManager sharedManager] removeClient];

Documentation

The documentation can be found here.

Dependencies

The following Pods will be installed when installing the FTMobileAuthSDK:

Author

Futurae Technologies AG, info@futurae.com