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

Commit eba1abd

Browse files
authored
Merge pull request #767 from wordpress-mobile/wcios/navigate-to-wpcom-with-email
Support navigation to WPCom login with an existing email
2 parents eb3af32 + 6d46464 commit eba1abd

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ _None._
3030
3131
-->
3232

33-
## 6.0.1
33+
## 6.1.0
3434

3535
### Breaking Changes
3636

3737
_None._
3838

3939
### New Features
4040

41-
_None._
41+
- Support navigating to the WPCom login flow with an existing email through `NavigateToEnterAccount`. [#767]
4242

4343
### Bug Fixes
4444

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PODS:
2222
- SVProgressHUD (2.2.5)
2323
- SwiftLint (0.49.1)
2424
- UIDeviceIdentifier (2.2.0)
25-
- WordPressAuthenticator (6.0.1-beta.1):
25+
- WordPressAuthenticator (6.1.0-beta.1):
2626
- GoogleSignIn (~> 6.0.1)
2727
- Gridicons (~> 1.0)
2828
- "NSURL+IDN (= 0.4)"
@@ -94,7 +94,7 @@ SPEC CHECKSUMS:
9494
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
9595
SwiftLint: 32ee33ded0636d0905ef6911b2b67bbaeeedafa5
9696
UIDeviceIdentifier: f33af270ba9045ea18b31d9aab88e42a0082ea67
97-
WordPressAuthenticator: 3b05690984590e0c97e44fec89bd06ab16a2da1f
97+
WordPressAuthenticator: e632aa8afeb4583d0c7c0818e2add2bffce47ef2
9898
WordPressKit: d5bff8713aa7c0092ff6e2a58623e46a99fc897c
9999
WordPressShared: 0aa459e5257a77184db87805a998f447443c9706
100100
WordPressUI: 1cf47a3b78154faf69caa18569ee7ece1e510fa0

WordPressAuthenticator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Pod::Spec.new do |s|
44
s.name = 'WordPressAuthenticator'
5-
s.version = '6.0.1-beta.1'
5+
s.version = '6.1.0-beta.1'
66

77
s.summary = 'WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps.'
88
s.description = <<-DESC

WordPressAuthenticator/Navigation/NavigateToEnterAccount.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,26 @@ import Foundation
44
///
55
public struct NavigateToEnterAccount: NavigationCommand {
66
private let signInSource: SignInSource
7+
private let email: String?
78

8-
public init(signInSource: SignInSource) {
9+
public init(signInSource: SignInSource, email: String? = nil) {
910
self.signInSource = signInSource
11+
self.email = email
1012
}
1113

1214
public func execute(from: UIViewController?) {
13-
continueWithDotCom(navigationController: from?.navigationController)
15+
continueWithDotCom(email: email, navigationController: from?.navigationController)
1416
}
1517
}
1618

1719
private extension NavigateToEnterAccount {
18-
private func continueWithDotCom(navigationController: UINavigationController?) {
20+
private func continueWithDotCom(email: String? = nil, navigationController: UINavigationController?) {
1921
guard let vc = GetStartedViewController.instantiate(from: .getStarted) else {
2022
WPAuthenticatorLogError("Failed to navigate from LoginPrologueViewController to GetStartedViewController")
2123
return
2224
}
2325
vc.source = signInSource
26+
vc.loginFields.username = email ?? ""
2427

2528
navigationController?.pushViewController(vc, animated: true)
2629
}

0 commit comments

Comments
 (0)