This repository was archived by the owner on Feb 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
WordPressAuthenticator/Unified Auth/View Related/Get Started Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = "WordPressAuthenticator"
3- s . version = "1.37.0 "
3+ s . version = "1.38.0-beta.1 "
44
55 s . summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
66 s . description = <<-DESC
Original file line number Diff line number Diff line change @@ -408,7 +408,22 @@ private extension GetStartedViewController {
408408 // username instead.
409409 self . showSelfHostedWithError ( error)
410410 } else {
411- self . displayError ( error as NSError , sourceTag: self . sourceTag)
411+ guard let authenticationDelegate = WordPressAuthenticator . shared. delegate,
412+ authenticationDelegate. shouldHandleError ( error) else {
413+ self . displayError ( error as NSError , sourceTag: self . sourceTag)
414+ return
415+ }
416+
417+ /// Hand over control to the host app.
418+ authenticationDelegate. handleError ( error) { customUI in
419+ // Setting the rightBarButtonItems of the custom UI before pushing the view controller
420+ // and resetting the navigationController's navigationItem after the push seems to be the
421+ // only combination that gets the Help button to show up.
422+ customUI. navigationItem. rightBarButtonItems = self . navigationItem. rightBarButtonItems
423+ self . navigationController? . navigationItem. rightBarButtonItems = self . navigationItem. rightBarButtonItems
424+
425+ self . navigationController? . pushViewController ( customUI, animated: true )
426+ }
412427 }
413428 }
414429
You can’t perform that action at this time.
0 commit comments