Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 4b97bc5

Browse files
committed
Keep the same password only flow for AppleAuthenticatorDelegate.showWPComLogin.
1 parent ba6e77c commit 4b97bc5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

WordPressAuthenticator/Unified Auth/View Related/Get Started/GetStartedViewController.swift

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ private extension GetStartedViewController {
501501
success: { [weak self] passwordless in
502502
self?.configureViewLoading(false)
503503
self?.loginFields.meta.passwordless = passwordless
504-
passwordless ? self?.requestAuthenticationLink() : self?.showPasswordView()
504+
passwordless ? self?.requestAuthenticationLink() : self?.showPasswordOrMagicLinkView()
505505
},
506506
failure: { [weak self] error in
507507
WordPressAuthenticator.track(.loginFailed, error: error)
@@ -518,6 +518,21 @@ private extension GetStartedViewController {
518518
/// Show the Password entry view.
519519
///
520520
func showPasswordView() {
521+
guard let vc = PasswordViewController.instantiate(from: .password) else {
522+
DDLogError("Failed to navigate to PasswordViewController from GetStartedViewController")
523+
return
524+
}
525+
526+
vc.source = source
527+
vc.loginFields = loginFields
528+
vc.trackAsPasswordChallenge = false
529+
530+
navigationController?.pushViewController(vc, animated: true)
531+
}
532+
533+
/// Show the password or magic link view based on the configuration.
534+
///
535+
func showPasswordOrMagicLinkView() {
521536
guard let navigationController = navigationController else {
522537
return
523538
}

0 commit comments

Comments
 (0)