This repository was archived by the owner on Feb 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
WordPressAuthenticator/Unified Auth/View Related/Get Started Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments