Skip to content
This repository was archived by the owner on Mar 26, 2023. It is now read-only.

Commit 2bca0e7

Browse files
authored
Remove CryptoKit cocoapod in favour of Apple's CryptoKit (#34)
* Replace CryptoKit with CryptoSwift * Update lock files * Remove CryptoSwift dependency and use Apple's CryptoKit * Increase firebase_auth_oauth plugin version * Update CHANGELOG.md
1 parent f570af7 commit 2bca0e7

File tree

9 files changed

+26
-25
lines changed

9 files changed

+26
-25
lines changed

firebase_auth_oauth/CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
## 0.2.3
2+
3+
* Replace CryptoKit pod with Apple's CryptoKit framework
4+
15
## 0.2.2
2-
* Fixed crash on iOS when using Microsoft sign in. Thanks to [@camillobucciarelli](https://github.com/camillobucciarelli).
6+
7+
* Fixed crash on iOS when using Microsoft sign in. Thanks
8+
to [@camillobucciarelli](https://github.com/camillobucciarelli).
39

410
## 0.2.1
11+
512
* Fixed Firebase not initialised issue when using this plugin
613

714
## 0.2.0
15+
816
* Migrated to `firebase_auth` ^0.18.0+1
917
* Migrated to `firebase_auth` ^0.5.0
1018
* Added `linkExistingUserWithCredentials` to link existing user with OAuth credentials

firebase_auth_oauth/example/ios/Podfile.lock

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
PODS:
2-
- CryptoKit (0.4.0)
32
- Firebase/Auth (6.26.0):
43
- Firebase/CoreOnly
54
- FirebaseAuth (~> 6.5.3)
@@ -11,7 +10,6 @@ PODS:
1110
- firebase_core
1211
- Flutter
1312
- firebase_auth_oauth (0.0.1):
14-
- CryptoKit (~> 0.4)
1513
- firebase_auth
1614
- Flutter
1715
- firebase_core (0.5.0):
@@ -69,7 +67,6 @@ DEPENDENCIES:
6967

7068
SPEC REPOS:
7169
trunk:
72-
- CryptoKit
7370
- Firebase
7471
- FirebaseAuth
7572
- FirebaseAuthInterop
@@ -93,10 +90,9 @@ EXTERNAL SOURCES:
9390
:path: Flutter
9491

9592
SPEC CHECKSUMS:
96-
CryptoKit: 778b0eb14434535f70fd1037b297841dd83e3c37
9793
Firebase: 7cf5f9c67f03cb3b606d1d6535286e1080e57eb6
9894
firebase_auth: c42c06a212439824b5da53437da905931e8e6b9a
99-
firebase_auth_oauth: e8041e29e7004b8656784c64b367e94ea97c1010
95+
firebase_auth_oauth: db7ad66aa729b98ed87ce68cfaa6bbf96cd65c74
10096
firebase_core: 3134fe79d257d430f163b558caf52a10a87efe8a
10197
FirebaseAuth: 7047aec89c0b17ecd924a550c853f0c27ac6015e
10298
FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9

firebase_auth_oauth/example/ios/Runner.xcodeproj/project.pbxproj

-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@
219219
);
220220
inputPaths = (
221221
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
222-
"${BUILT_PRODUCTS_DIR}/CryptoKit/CryptoKit.framework",
223222
"${PODS_ROOT}/../Flutter/Flutter.framework",
224223
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
225224
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
@@ -228,7 +227,6 @@
228227
);
229228
name = "[CP] Embed Pods Frameworks";
230229
outputPaths = (
231-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoKit.framework",
232230
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
233231
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
234232
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",

firebase_auth_oauth/example/pubspec.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ packages:
7777
path: ".."
7878
relative: true
7979
source: path
80-
version: "0.2.0"
80+
version: "0.2.3"
8181
firebase_auth_oauth_platform_interface:
8282
dependency: transitive
8383
description:
8484
name: firebase_auth_oauth_platform_interface
8585
url: "https://pub.dartlang.org"
8686
source: hosted
87-
version: "0.2.0"
87+
version: "0.2.1"
8888
firebase_auth_oauth_web:
8989
dependency: transitive
9090
description:
91-
path: "../../firebase_auth_oauth_web"
92-
relative: true
93-
source: path
94-
version: "0.2.0"
91+
name: firebase_auth_oauth_web
92+
url: "https://pub.dartlang.org"
93+
source: hosted
94+
version: "0.2.1"
9595
firebase_auth_platform_interface:
9696
dependency: transitive
9797
description:

firebase_auth_oauth/ios/Classes/FirebaseAuthOAuthPlugin+AppleSignIniOS13.swift

+1-3
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ extension FirebaseAuthOAuthViewController: ASAuthorizationControllerDelegate {
5555

5656
@available(iOS 13, *)
5757
private func sha256(_ input: String) -> String {
58-
let inputData = Data(input.utf8)
59-
return inputData.digest(using: .sha256).compactMap {
58+
return SHA256.hash(data: Data(input.utf8)).compactMap {
6059
return String(format: "%02x", $0)
6160
}.joined()
62-
6361
}
6462

6563
// Adapted from https://auth0.com/docs/api-auth/tutorials/nonce#generate-a-cryptographically-random-nonce

firebase_auth_oauth/ios/firebase_auth_oauth.podspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ A new flutter plugin project.
1616
s.source_files = 'Classes/**/*'
1717
s.dependency 'Flutter'
1818
s.dependency 'firebase_auth'
19-
s.dependency 'CryptoKit', '~> 0.4'
19+
# s.dependency 'CryptoSwift', '~> 1.2.0'
2020
s.framework = 'AuthenticationServices'
21+
s.framework = 'CryptoKit'
2122
s.static_framework = true
2223
s.platform = :ios, '9.0'
2324

firebase_auth_oauth/pubspec.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ packages:
7070
name: firebase_auth_oauth_platform_interface
7171
url: "https://pub.dartlang.org"
7272
source: hosted
73-
version: "0.2.0"
73+
version: "0.2.1"
7474
firebase_auth_oauth_web:
7575
dependency: "direct main"
7676
description:
77-
path: "../firebase_auth_oauth_web"
78-
relative: true
79-
source: path
80-
version: "0.2.0"
77+
name: firebase_auth_oauth_web
78+
url: "https://pub.dartlang.org"
79+
source: hosted
80+
version: "0.2.1"
8181
firebase_auth_platform_interface:
8282
dependency: transitive
8383
description:

firebase_auth_oauth/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: firebase_auth_oauth
22
description: A Flutter plugin that makes it easy to perform OAuth sign in flows using FirebaseAuth. It also includes support for Sign in by Apple for Firebase.
3-
version: 0.2.2
3+
version: 0.2.3
44
author: Amr Yousef <[email protected]>
55
homepage: https://github.com/amrfarid140/firebase_auth_oauth/tree/master/firebase_auth_oauth
66

firebase_auth_oauth_web/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ packages:
7070
name: firebase_auth_oauth_platform_interface
7171
url: "https://pub.dartlang.org"
7272
source: hosted
73-
version: "0.2.0"
73+
version: "0.2.1"
7474
firebase_auth_platform_interface:
7575
dependency: transitive
7676
description:

0 commit comments

Comments
 (0)