From fde4a97f73698cd5f757f2cdc8cfd7883bad61ab Mon Sep 17 00:00:00 2001 From: Hicham Boushaba Date: Thu, 14 Nov 2024 15:46:24 +0100 Subject: [PATCH 1/5] Point WordPressKit to branch version --- Podfile | 2 +- Podfile.lock | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Podfile b/Podfile index 6f1ba9bf..9ac1aa66 100644 --- a/Podfile +++ b/Podfile @@ -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', branch: 'magic-link-create-account' pod 'WordPressShared', '~> 2.1-beta' third_party_pods diff --git a/Podfile.lock b/Podfile.lock index b23203b0..b5716eaa 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -15,7 +15,7 @@ PODS: - WordPressKit (~> 17.0) - WordPressShared (~> 2.1-beta) - WordPressUI (~> 1.7-beta) - - WordPressKit (17.0.0): + - WordPressKit (17.2.0): - NSObject-SafeExpectations (~> 0.0.4) - UIDeviceIdentifier (~> 2.0) - WordPressShared (~> 2.0-beta) @@ -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`, branch `magic-link-create-account`) - WordPressShared (~> 2.1-beta) - WordPressUI (~> 1.7-beta) @@ -48,7 +48,6 @@ SPEC REPOS: - SVProgressHUD - SwiftLint - UIDeviceIdentifier - - WordPressKit - WordPressShared - WordPressUI - wpxmlrpc @@ -56,6 +55,14 @@ SPEC REPOS: EXTERNAL SOURCES: WordPressAuthenticator: :path: "." + WordPressKit: + :branch: magic-link-create-account + :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git + +CHECKOUT OPTIONS: + WordPressKit: + :commit: f731cfaf2ccdb26604c9ac251d1a87d488910f4c + :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git SPEC CHECKSUMS: Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 @@ -68,11 +75,11 @@ SPEC CHECKSUMS: SwiftLint: c1de071d9d08c8aba837545f6254315bc900e211 UIDeviceIdentifier: 442b65b4ff1832d4ca9c2a157815cb29ad981b17 WordPressAuthenticator: d151cc7ebc1cfcbf5c28bb2c9afe760a75b49ba6 - WordPressKit: a71cc550f4b525ab5eef057984c8de071462edd5 + WordPressKit: 98809cdb460bacc6634b49079335a5ccace34e59 WordPressShared: 87f3ee89b0a3e83106106f13a8b71605fb8eb6d2 WordPressUI: a491454affda3b0fb812812e637dc5e8f8f6bd06 wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd -PODFILE CHECKSUM: 98c48a8558a07d876e1720351adcb835bc40ce14 +PODFILE CHECKSUM: d8b7855d6992f09af642898ba31d030f8b8b8a2b COCOAPODS: 1.14.3 From e952ebf7cb6697c6c1d405d0adad4acf6397c335 Mon Sep 17 00:00:00 2001 From: Hicham Boushaba Date: Thu, 14 Nov 2024 15:48:41 +0100 Subject: [PATCH 2/5] Add support for requesting account creation when sending magic link --- .../Services/WordPressComAccountService.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/WordPressAuthenticator/Services/WordPressComAccountService.swift b/WordPressAuthenticator/Services/WordPressComAccountService.swift index ac348b55..375751d9 100644 --- a/WordPressAuthenticator/Services/WordPressComAccountService.swift +++ b/WordPressAuthenticator/Services/WordPressComAccountService.swift @@ -47,7 +47,10 @@ 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, @@ -55,6 +58,7 @@ public class WordPressComAccountService { clientSecret: configuration.wpcomSecret, source: jetpackLogin ? .jetpackConnect : .default, wpcomScheme: configuration.wpcomScheme, + createAccountIfNotFound: createAccountIfNotFound, success: success, failure: { error in let result = error ?? ServiceError.unknown From 75b4296b07278be64f070ee06db826bf59b4931f Mon Sep 17 00:00:00 2001 From: Hicham Boushaba Date: Fri, 15 Nov 2024 09:54:51 +0100 Subject: [PATCH 3/5] Add a changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de802a19..b287cf40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 From 2159a396bda273dc58f59a15efcf89af44c9e552 Mon Sep 17 00:00:00 2001 From: Hicham Boushaba Date: Wed, 20 Nov 2024 13:23:40 +0100 Subject: [PATCH 4/5] Point WordPressKit to trunk commit --- Podfile | 2 +- Podfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Podfile b/Podfile index 9ac1aa66..0d5445b7 100644 --- a/Podfile +++ b/Podfile @@ -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', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', branch: 'magic-link-create-account' + pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: 'a005f59565e5d12dbd8f13ed31061ff8dd2c43ff' pod 'WordPressShared', '~> 2.1-beta' third_party_pods diff --git a/Podfile.lock b/Podfile.lock index b5716eaa..38bfb4e9 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -33,7 +33,7 @@ DEPENDENCIES: - SVProgressHUD (= 2.2.5) - SwiftLint (= 0.54.0) - WordPressAuthenticator (from `.`) - - WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, branch `magic-link-create-account`) + - WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, commit `a005f59565e5d12dbd8f13ed31061ff8dd2c43ff`) - WordPressShared (~> 2.1-beta) - WordPressUI (~> 1.7-beta) @@ -56,12 +56,12 @@ EXTERNAL SOURCES: WordPressAuthenticator: :path: "." WordPressKit: - :branch: magic-link-create-account + :commit: a005f59565e5d12dbd8f13ed31061ff8dd2c43ff :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git CHECKOUT OPTIONS: WordPressKit: - :commit: f731cfaf2ccdb26604c9ac251d1a87d488910f4c + :commit: a005f59565e5d12dbd8f13ed31061ff8dd2c43ff :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git SPEC CHECKSUMS: @@ -80,6 +80,6 @@ SPEC CHECKSUMS: WordPressUI: a491454affda3b0fb812812e637dc5e8f8f6bd06 wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd -PODFILE CHECKSUM: d8b7855d6992f09af642898ba31d030f8b8b8a2b +PODFILE CHECKSUM: 5f9339b1c70a28569504b553d7dde7d2f4b285bc COCOAPODS: 1.14.3 From dd8dd1684ba622703601ce5b0a3f304e2eb216e0 Mon Sep 17 00:00:00 2001 From: "Tanner W. Stokes" Date: Wed, 20 Nov 2024 09:39:27 -0500 Subject: [PATCH 5/5] Test new version. --- Podfile | 2 +- Podfile.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Podfile b/Podfile index 0d5445b7..dfdb2573 100644 --- a/Podfile +++ b/Podfile @@ -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', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: 'a005f59565e5d12dbd8f13ed31061ff8dd2c43ff' + pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: 'ba7389db54376be9c657b29316ef65b308405c3b' pod 'WordPressShared', '~> 2.1-beta' third_party_pods diff --git a/Podfile.lock b/Podfile.lock index 38bfb4e9..917ef283 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -15,7 +15,7 @@ PODS: - WordPressKit (~> 17.0) - WordPressShared (~> 2.1-beta) - WordPressUI (~> 1.7-beta) - - WordPressKit (17.2.0): + - WordPressKit (17.3.0): - NSObject-SafeExpectations (~> 0.0.4) - UIDeviceIdentifier (~> 2.0) - WordPressShared (~> 2.0-beta) @@ -33,7 +33,7 @@ DEPENDENCIES: - SVProgressHUD (= 2.2.5) - SwiftLint (= 0.54.0) - WordPressAuthenticator (from `.`) - - WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, commit `a005f59565e5d12dbd8f13ed31061ff8dd2c43ff`) + - WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, commit `ba7389db54376be9c657b29316ef65b308405c3b`) - WordPressShared (~> 2.1-beta) - WordPressUI (~> 1.7-beta) @@ -56,12 +56,12 @@ EXTERNAL SOURCES: WordPressAuthenticator: :path: "." WordPressKit: - :commit: a005f59565e5d12dbd8f13ed31061ff8dd2c43ff + :commit: ba7389db54376be9c657b29316ef65b308405c3b :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git CHECKOUT OPTIONS: WordPressKit: - :commit: a005f59565e5d12dbd8f13ed31061ff8dd2c43ff + :commit: ba7389db54376be9c657b29316ef65b308405c3b :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git SPEC CHECKSUMS: @@ -75,11 +75,11 @@ SPEC CHECKSUMS: SwiftLint: c1de071d9d08c8aba837545f6254315bc900e211 UIDeviceIdentifier: 442b65b4ff1832d4ca9c2a157815cb29ad981b17 WordPressAuthenticator: d151cc7ebc1cfcbf5c28bb2c9afe760a75b49ba6 - WordPressKit: 98809cdb460bacc6634b49079335a5ccace34e59 + WordPressKit: faf8c6de7c2acfe71cf95b4db896901060967089 WordPressShared: 87f3ee89b0a3e83106106f13a8b71605fb8eb6d2 WordPressUI: a491454affda3b0fb812812e637dc5e8f8f6bd06 wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd -PODFILE CHECKSUM: 5f9339b1c70a28569504b553d7dde7d2f4b285bc +PODFILE CHECKSUM: e9ff0e92f3449391df3719ac05bdf9b98f1da7ff COCOAPODS: 1.14.3