@capgo/capacitor-social-login 7.7.0 → 7.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.dependency 'Capacitor'
17
17
  s.dependency 'FBSDKCoreKit', '17.4.0'
18
18
  s.dependency 'FBSDKLoginKit', '17.4.0'
19
- s.dependency 'GoogleSignIn', '~> 8.0.0'
19
+ s.dependency 'GoogleSignIn', '~> 9.0.0'
20
20
  s.dependency 'Alamofire', '~> 5.10.2'
21
21
  s.swift_version = '5.1'
22
22
  end
package/Package.swift CHANGED
@@ -14,7 +14,7 @@ let package = Package(
14
14
  // FBSDKCoreKit and FBSDKLoginKit
15
15
  .package(url: "https://github.com/facebook/facebook-ios-sdk.git", .upToNextMajor(from: "17.4.0")),
16
16
  // Add Google Sign-In dependency
17
- .package(url: "https://github.com/google/GoogleSignIn-iOS.git", .upToNextMajor(from: "8.0.0")),
17
+ .package(url: "https://github.com/google/GoogleSignIn-iOS.git", .upToNextMajor(from: "9.0.0")),
18
18
  // Alamofire
19
19
  .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.10.2"))
20
20
  ],
@@ -31,11 +31,6 @@ class GoogleProvider {
31
31
  } else {
32
32
  self.forceAuthCode = false
33
33
  }
34
- // if nonce reject login as we need v9 to release to work
35
- if let nonce = payload["nonce"] as? String {
36
- completion(.failure(NSError(domain: "GoogleProvider", code: 0, userInfo: [NSLocalizedDescriptionKey: "Nonce is not supported in this version of the SDK, when V9 will be release it will work https://github.com/google/GoogleSignIn-iOS/tags"])))
37
- return
38
- }
39
34
 
40
35
  func login() {
41
36
  guard let presentingVc = UIApplication.shared.windows.first?.rootViewController else {
@@ -52,7 +47,8 @@ class GoogleProvider {
52
47
  GIDSignIn.sharedInstance.signIn(
53
48
  withPresenting: presentingVc,
54
49
  hint: nil,
55
- additionalScopes: payload["scopes"] as? [String] ?? self.defaultGrantedScopes
50
+ additionalScopes: payload["scopes"] as? [String] ?? self.defaultGrantedScopes,
51
+ nonce: payload["nonce"] as? String
56
52
  ) { result, error in
57
53
  if let error = error {
58
54
  completion(.failure(error))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-social-login",
3
- "version": "7.7.0",
3
+ "version": "7.8.0",
4
4
  "description": "All social logins in one plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",