FRUser

extension FRUser
  • Authenticates a new user with pre-defined UI, and viewControllers pre-built in FRUI framework

    Note When there is already authenticated user’s session (either with Session Token and/or OAuth2 token set), login method returns an error. If Session Token exists, but not OAuth2 token set, use FRUser.currentUser.getAccessToken() to obtain OAuth2 token set using Session Token.

    Declaration

    Swift

    public static func authenticateWithUI<T>(_ rootViewController: UIViewController, completion: @escaping NodeUICompletion<T>)

    Parameters

    rootViewController

    root viewController which will initiate navigation flow

    completion

    completion callback block that notifies the result of the flow

  • Registers a new user with pre-defined UI, and viewControllers pre-built in FRUI framework

    Note When there is already authenticated user’s session (either with Session Token and/or OAuth2 token set), register method returns an error. If Session Token exists, but not OAuth2 token set, use FRUser.currentUser.getAccessToken() to obtain OAuth2 token set using Session Token.

    Declaration

    Swift

    public static func registerWithUI<T>(_ rootViewController: UIViewController, completion: @escaping NodeUICompletion<T>)

    Parameters

    rootViewController

    root viewController which will initiate navigation flow

    completion

    completion callback block that notifies the result of the flow