addAccountRecoveryCallback
AppDelegate.reachfive().addAccountRecoveryCallback(recoveryCallback)
Setup
Before using this method, you need to setup deep link interception by using application(_:open:options).
About this command
Add the callback that will be executed when the account recovery url is intercepted. Parse the link and extract the verification code.
Examples
You would typically call this method in the controller handling the UI for manually entering the verification code:
import Reach5
import UIKit
class RecoveryVerificationController: UIViewController {
override func viewDidLoad() {
AppDelegate.reachfive().addAccountRecoveryCallback { result in
switch result {
case .success(let response):
let email = response.email
let verificationCode = response.verificationCode
// show UI for setting up a new passkey or choosing a new password
case .failure(let error):
// handle failure
}
}
}
}
Parameters
Parameter | Description | ||||
---|---|---|---|---|---|
The callback that will be executed when the account recovery link is intercepted.
The callback takes a
|