Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ _None._
### New Features

- Add support for logging in into WPCOM suspended sites.
- Update `WordPressComAccountService/requestAuthenticationLink` with a new argument `createAccountIfNotFound` to allow creating new accounts.

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def wordpress_authenticator_pods
## These should match the version requirement from the podspec.
pod 'Gridicons', '~> 1.0'
pod 'WordPressUI', '~> 1.7-beta'
pod 'WordPressKit', '~> 17.0'
pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: 'ba7389db54376be9c657b29316ef65b308405c3b'
pod 'WordPressShared', '~> 2.1-beta'

third_party_pods
Expand Down
17 changes: 12 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PODS:
- WordPressKit (~> 17.0)
- WordPressShared (~> 2.1-beta)
- WordPressUI (~> 1.7-beta)
- WordPressKit (17.0.0):
- WordPressKit (17.3.0):
- NSObject-SafeExpectations (~> 0.0.4)
- UIDeviceIdentifier (~> 2.0)
- WordPressShared (~> 2.0-beta)
Expand All @@ -33,7 +33,7 @@ DEPENDENCIES:
- SVProgressHUD (= 2.2.5)
- SwiftLint (= 0.54.0)
- WordPressAuthenticator (from `.`)
- WordPressKit (~> 17.0)
- WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, commit `ba7389db54376be9c657b29316ef65b308405c3b`)
- WordPressShared (~> 2.1-beta)
- WordPressUI (~> 1.7-beta)

Expand All @@ -48,14 +48,21 @@ SPEC REPOS:
- SVProgressHUD
- SwiftLint
- UIDeviceIdentifier
- WordPressKit
- WordPressShared
- WordPressUI
- wpxmlrpc

EXTERNAL SOURCES:
WordPressAuthenticator:
:path: "."
WordPressKit:
:commit: ba7389db54376be9c657b29316ef65b308405c3b
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git

CHECKOUT OPTIONS:
WordPressKit:
:commit: ba7389db54376be9c657b29316ef65b308405c3b
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git

SPEC CHECKSUMS:
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
Expand All @@ -68,11 +75,11 @@ SPEC CHECKSUMS:
SwiftLint: c1de071d9d08c8aba837545f6254315bc900e211
UIDeviceIdentifier: 442b65b4ff1832d4ca9c2a157815cb29ad981b17
WordPressAuthenticator: d151cc7ebc1cfcbf5c28bb2c9afe760a75b49ba6
WordPressKit: a71cc550f4b525ab5eef057984c8de071462edd5
WordPressKit: faf8c6de7c2acfe71cf95b4db896901060967089
WordPressShared: 87f3ee89b0a3e83106106f13a8b71605fb8eb6d2
WordPressUI: a491454affda3b0fb812812e637dc5e8f8f6bd06
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd

PODFILE CHECKSUM: 98c48a8558a07d876e1720351adcb835bc40ce14
PODFILE CHECKSUM: e9ff0e92f3449391df3719ac05bdf9b98f1da7ff

COCOAPODS: 1.14.3
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@ public class WordPressComAccountService {

/// Requests a WordPress.com Authentication Link to be sent to the specified email address.
///
public func requestAuthenticationLink(for email: String, jetpackLogin: Bool, success: @escaping () -> Void, failure: @escaping (Error) -> Void) {
public func requestAuthenticationLink(for email: String,
jetpackLogin: Bool,
createAccountIfNotFound: Bool = false,
success: @escaping () -> Void, failure: @escaping (Error) -> Void) {
let remote = AccountServiceRemoteREST(wordPressComRestApi: anonymousAPI)

remote.requestWPComAuthLink(forEmail: email,
clientID: configuration.wpcomClientId,
clientSecret: configuration.wpcomSecret,
source: jetpackLogin ? .jetpackConnect : .default,
wpcomScheme: configuration.wpcomScheme,
createAccountIfNotFound: createAccountIfNotFound,
success: success,
failure: { error in
let result = error ?? ServiceError.unknown
Expand Down