IdentityUIDelegate
public protocol IdentityUIDelegate : AnyObject
Implement this delegate to handle the events that occur inside the UI flow
-
Called when the UI flow is finished.
Declaration
Swift
func didFinish(result: IdentityUIResult)
-
willPresent(flow:)
Default implementationCalled before going ahead with the a flow.
You can control whether or not you want a particular flow to be usable or not by implementing this method.
Default Implementation
Declaration
Swift
func willPresent(flow: LoginMethod.FlowVariant) -> LoginFlowDisposition
-
skipRequested(topViewController:done:)
Default implementationThis will be called when he user presses the skip button on a skippable UI flow
You must call the done callback and tell the UI to either continue or ignore the request to skip the login flow
Default Implementation
Declaration
Swift
func skipRequested(topViewController: UIViewController, done: @escaping (SkipLoginDisposition) -> Void)
Parameters
topViewController
the view controller that is currently the topViewController of the internal naviagtion controller
done
call this to tell the flow to continue
-
willSucceed(with:done:)
Default implementationThis will be called right before
didFinish
is called with a success resultYou can use this to do other work to finish your login process. The
done
callback you call will tell the UI what to do next.The view controller passed in is whatever is being shown at the time. This can be nil in some cases where the login flow did not need to fire up a flow (when validating a signing deep link when launching the app for e.g.)
Default Implementation
Declaration
Swift
func willSucceed(with user: User, done: @escaping (LoginWillSucceedDisposition) -> Void)
Parameters
result
the
User
that will be given todidFinish
topViewController
The currently shown top view controller
done
call this to say you’re done so the UI can continue