addPasswordlessCallback

AppDelegate.reachfive().addPasswordlessCallback(passwordlessCallback)

About this command

Add the callback that will be executed when the magic link is intercepted.

Examples

import IdentitySdkCore

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
  func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
      AppDelegate.reachfive().addPasswordlessCallback { result in
        switch (result) {
          case .success(authToken):
            // Handle authToken
          case .failure(error):
            // Handle error
          }
      }

      return true
  }
}

Parameters

passwordlessCallback PasswordlessCallback

The callback that will be executed when the magic link is intercepted.

Feedback