From fde4a97f73698cd5f757f2cdc8cfd7883bad61ab Mon Sep 17 00:00:00 2001 From: Hicham Boushaba Date: Thu, 14 Nov 2024 15:46:24 +0100 Subject: [PATCH 1/8] 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/8] 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/8] 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/8] 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 836776395cbedf557f0928abe1e6e32f5beab360 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 21 Nov 2024 16:38:42 +1100 Subject: [PATCH 5/8] Update CocoaPods to the latest version 1.16.2 --- Gemfile.lock | 57 +++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ce2f2177..55e46d15 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,20 +1,24 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.6) + CFPropertyList (3.0.7) + base64 + nkf rexml - activesupport (7.1.2) + activesupport (7.2.2) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) @@ -39,7 +43,8 @@ GEM aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) base64 (0.2.0) - bigdecimal (3.1.5) + benchmark (0.4.0) + bigdecimal (3.1.8) buildkit (1.5.0) sawyer (>= 0.6) chroma (0.2.0) @@ -48,10 +53,10 @@ GEM cork nap open4 (~> 1.3) - cocoapods (1.14.3) + cocoapods (1.16.2) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.14.3) + cocoapods-core (= 1.16.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -65,10 +70,10 @@ GEM molinillo (~> 0.8.0) nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.23.0, < 2.0) + xcodeproj (>= 1.27.0, < 2.0) cocoapods-check (1.1.0) cocoapods (~> 1.0) - cocoapods-core (1.14.3) + cocoapods-core (1.16.2) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -91,7 +96,7 @@ GEM colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) - concurrent-ruby (1.2.2) + concurrent-ruby (1.3.4) connection_pool (2.4.1) cork (0.3.0) colored2 (~> 3.1) @@ -137,8 +142,7 @@ GEM rake (>= 12.0.0, < 14.0.0) domain_name (0.6.20231109) dotenv (2.8.1) - drb (2.2.0) - ruby2_keywords + drb (2.2.1) emoji_regex (3.2.3) escape (0.0.4) ethon (0.16.0) @@ -232,7 +236,8 @@ GEM rake (>= 12.3, < 14.0) rake-compiler (~> 1.0) xcodeproj (~> 1.22) - ffi (1.16.3) + ffi (1.17.0) + ffi (1.17.0-x86_64-darwin) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) @@ -281,29 +286,30 @@ GEM http-cookie (1.0.5) domain_name (~> 0.5) httpclient (2.8.3) - i18n (1.14.1) + i18n (1.14.6) concurrent-ruby (~> 1.0) java-properties (0.3.0) jmespath (1.6.2) - json (2.7.1) + json (2.8.2) jwt (2.7.1) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) language_server-protocol (3.17.0.3) + logger (1.6.1) mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.5) - minitest (5.20.0) + minitest (5.25.1) molinillo (0.8.0) multi_json (1.15.0) multipart-post (2.3.0) - mutex_m (0.2.0) - nanaimo (0.3.0) + nanaimo (0.4.0) nap (1.1.0) naturally (2.2.1) netrc (0.11.0) + nkf (0.2.0) no_proxy_fix (0.1.2) nokogiri (1.15.5) mini_portile2 (~> 2.8.2) @@ -339,7 +345,7 @@ GEM trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.6) + rexml (3.3.9) rouge (2.0.7) rubocop (1.60.2) json (~> 2.3) @@ -361,6 +367,7 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) + securerandom (0.3.2) security (0.1.3) signet (0.18.0) addressable (~> 2.8) @@ -387,13 +394,13 @@ GEM unicode-display_width (2.5.0) webrick (1.8.1) word_wrap (1.0.0) - xcodeproj (1.23.0) + xcodeproj (1.27.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) From 684ca83991c0ac42c0f30fb08fa1eed99ea72b33 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 21 Nov 2024 17:13:00 +1100 Subject: [PATCH 6/8] Point to WordPresskit 17.3.0 --- Podfile | 2 +- Podfile.lock | 23 ++++++++--------------- WordPressAuthenticator.podspec | 2 +- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Podfile b/Podfile index 0d5445b7..18a738f2 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', '~> 17.3' pod 'WordPressShared', '~> 2.1-beta' third_party_pods diff --git a/Podfile.lock b/Podfile.lock index 38bfb4e9..0ba3a064 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -12,10 +12,10 @@ PODS: - Gridicons (~> 1.0) - "NSURL+IDN (= 0.4)" - SVProgressHUD (~> 2.2.5) - - WordPressKit (~> 17.0) + - WordPressKit (~> 17.3) - 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 (~> 17.3) - WordPressShared (~> 2.1-beta) - WordPressUI (~> 1.7-beta) @@ -48,6 +48,7 @@ SPEC REPOS: - SVProgressHUD - SwiftLint - UIDeviceIdentifier + - WordPressKit - WordPressShared - WordPressUI - wpxmlrpc @@ -55,14 +56,6 @@ SPEC REPOS: EXTERNAL SOURCES: WordPressAuthenticator: :path: "." - WordPressKit: - :commit: a005f59565e5d12dbd8f13ed31061ff8dd2c43ff - :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git - -CHECKOUT OPTIONS: - WordPressKit: - :commit: a005f59565e5d12dbd8f13ed31061ff8dd2c43ff - :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git SPEC CHECKSUMS: Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 @@ -74,12 +67,12 @@ SPEC CHECKSUMS: SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 SwiftLint: c1de071d9d08c8aba837545f6254315bc900e211 UIDeviceIdentifier: 442b65b4ff1832d4ca9c2a157815cb29ad981b17 - WordPressAuthenticator: d151cc7ebc1cfcbf5c28bb2c9afe760a75b49ba6 - WordPressKit: 98809cdb460bacc6634b49079335a5ccace34e59 + WordPressAuthenticator: 0f4f47d6f71cfa763cb636876d69170a3c710002 + WordPressKit: faf8c6de7c2acfe71cf95b4db896901060967089 WordPressShared: 87f3ee89b0a3e83106106f13a8b71605fb8eb6d2 WordPressUI: a491454affda3b0fb812812e637dc5e8f8f6bd06 wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd -PODFILE CHECKSUM: 5f9339b1c70a28569504b553d7dde7d2f4b285bc +PODFILE CHECKSUM: 39dc5efbdeec9efbe53518c7b5dd0e7853526c1c -COCOAPODS: 1.14.3 +COCOAPODS: 1.16.2 diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index c745a680..d29d04ce 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -40,6 +40,6 @@ Pod::Spec.new do |s| # Use a loose restriction that allows both production and beta versions, up to the next major version. # If you want to update which of these is used, specify it in the host app. s.dependency 'WordPressUI', '~> 1.7-beta' - s.dependency 'WordPressKit', '~> 17.0' + s.dependency 'WordPressKit', '~> 17.3' s.dependency 'WordPressShared', '~> 2.1-beta' end From 6459f8a925c0a0b94d969e2d1437a3772f151e11 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 21 Nov 2024 17:15:40 +1100 Subject: [PATCH 7/8] Update CHANGELOG with details from #861 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b287cf40..a8ed0250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ _None._ - Add support for logging in into WPCOM suspended sites. - Update `WordPressComAccountService/requestAuthenticationLink` with a new argument `createAccountIfNotFound` to allow creating new accounts. +- Add support for requesting account creation when sending auth magic link [#861] ### Bug Fixes From 7226ee2168a2998ccc8910e4f096d1e8040afde1 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 21 Nov 2024 17:16:34 +1100 Subject: [PATCH 8/8] Remove duplicated CHANGELOG entry --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8ed0250..5216a30c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,8 +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. -- Add support for requesting account creation when sending auth magic link [#861] +- Update `WordPressComAccountService/requestAuthenticationLink` with a new argument `createAccountIfNotFound` to allow creating new accounts. [#861] ### Bug Fixes