in authentication/AuthenticationExample/ViewControllers/UserViewController.swift [64:102]
func didSelectRowAt(_ indexPath: IndexPath, on tableView: UITableView) {
let item = dataSourceProvider.item(at: indexPath)
let actionName = item.isEditable ? item.detailTitle! : item.title!
guard let action = UserAction(rawValue: actionName) else {
// The row tapped has no affiliated action.
return
}
switch action {
case .signOut:
signCurrentUserOut()
case .link:
linkUserToOtherAuthProviders()
case .requestVerifyEmail:
requestVerifyEmail()
case .tokenRefresh:
refreshCurrentUserIDToken()
case .delete:
deleteCurrentUser()
case .updateEmail:
presentEditUserInfoController(for: item, to: updateUserEmail)
case .updateDisplayName:
presentEditUserInfoController(for: item, to: updateUserDisplayName)
case .updatePhotoURL:
presentEditUserInfoController(for: item, to: updatePhotoURL)
case .refreshUserInfo:
refreshUserInfo()
}
}