Skip to content

Commit e081c82

Browse files
authored
refactor: Bump GoogleSignIn to 6.2.4, request additional scopes on signin (#321)
1 parent 092f4cb commit e081c82

File tree

3 files changed

+28
-39
lines changed

3 files changed

+28
-39
lines changed

ios/Plugin/Plugin.swift

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,24 +62,12 @@ public class GoogleAuth: CAPPlugin {
6262
} else {
6363
let presentingVc = self.bridge!.viewController!;
6464

65-
self.googleSignIn.signIn(with: self.googleSignInConfiguration, presenting: presentingVc) { user, error in
65+
self.googleSignIn.signIn(with: self.googleSignInConfiguration, presenting: presentingVc, hint: nil, additionalScopes: self.additionalScopes) { user, error in
6666
if let error = error {
6767
self.signInCall?.reject(error.localizedDescription, "\(error._code)");
6868
return;
6969
}
70-
if self.additionalScopes.count > 0 {
71-
// requesting additional scopes in GoogleSignIn-iOS SDK 6.0 requires that you sign the user in and then request additional scopes,
72-
// there's no method to include the additional scopes in the initial sign in request
73-
self.googleSignIn.addScopes(self.additionalScopes, presenting: presentingVc) { user, error in
74-
if let error = error {
75-
self.signInCall?.reject(error.localizedDescription);
76-
return;
77-
}
78-
self.resolveSignInCallWith(user: user!);
79-
}
80-
} else {
81-
self.resolveSignInCallWith(user: user!);
82-
}
70+
self.resolveSignInCallWith(user: user!);
8371
};
8472
}
8573
}

ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target 'Plugin' do
88
pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
99
pod 'CapacitorCordova', :path => '../node_modules/@capacitor/ios'
1010

11-
pod 'GoogleSignIn', '~> 6.0.1'
11+
pod 'GoogleSignIn', '~> 6.2.4'
1212

1313
end
1414

ios/Podfile.lock

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
PODS:
2-
- AppAuth (1.4.0):
3-
- AppAuth/Core (= 1.4.0)
4-
- AppAuth/ExternalUserAgent (= 1.4.0)
5-
- AppAuth/Core (1.4.0)
6-
- AppAuth/ExternalUserAgent (1.4.0)
7-
- Capacitor (3.0.1):
2+
- AppAuth (1.6.2):
3+
- AppAuth/Core (= 1.6.2)
4+
- AppAuth/ExternalUserAgent (= 1.6.2)
5+
- AppAuth/Core (1.6.2)
6+
- AppAuth/ExternalUserAgent (1.6.2):
7+
- AppAuth/Core
8+
- Capacitor (5.0.4):
89
- CapacitorCordova
9-
- CapacitorCordova (3.0.1)
10-
- GoogleSignIn (6.0.1):
11-
- AppAuth (~> 1.4)
12-
- GTMAppAuth (~> 1.0)
13-
- GTMSessionFetcher/Core (~> 1.1)
14-
- GTMAppAuth (1.2.2):
15-
- AppAuth/Core (~> 1.4)
16-
- GTMSessionFetcher/Core (~> 1.5)
17-
- GTMSessionFetcher/Core (1.6.1)
10+
- CapacitorCordova (5.0.4)
11+
- GoogleSignIn (6.2.4):
12+
- AppAuth (~> 1.5)
13+
- GTMAppAuth (~> 1.3)
14+
- GTMSessionFetcher/Core (< 3.0, >= 1.1)
15+
- GTMAppAuth (1.3.1):
16+
- AppAuth/Core (~> 1.6)
17+
- GTMSessionFetcher/Core (< 3.0, >= 1.5)
18+
- GTMSessionFetcher/Core (2.3.0)
1819

1920
DEPENDENCIES:
2021
- "Capacitor (from `../node_modules/@capacitor/ios`)"
2122
- "CapacitorCordova (from `../node_modules/@capacitor/ios`)"
22-
- GoogleSignIn (~> 6.0.1)
23+
- GoogleSignIn (~> 6.2.0)
2324

2425
SPEC REPOS:
2526
trunk:
@@ -35,13 +36,13 @@ EXTERNAL SOURCES:
3536
:path: "../node_modules/@capacitor/ios"
3637

3738
SPEC CHECKSUMS:
38-
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
39-
Capacitor: 92088387144015b95e369bd7840e8ef28b8fe9f3
40-
CapacitorCordova: 624ae0d33d61b554eda6823da8ea6c3e5170f646
41-
GoogleSignIn: 1b0c4ec33a6fe282f4fa35d8ac64263230ddaf36
42-
GTMAppAuth: ad5c2b70b9a8689e1a04033c9369c4915bfcbe89
43-
GTMSessionFetcher: 36689134877faeb055b27dfa4ccc9ceaa42e029e
39+
AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570
40+
Capacitor: d3d4463573438b9fa65326d1f3549da6f4c21634
41+
CapacitorCordova: b1fe6bf1f36974a8e4a9044b342d22d49c0996d6
42+
GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a
43+
GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd
44+
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
4445

45-
PODFILE CHECKSUM: 0f3f70de2469d6ef87a4f55c3a96868777b79b2e
46+
PODFILE CHECKSUM: f37796f40e1c9a0233c6f7494f01210c0cedf4f7
4647

47-
COCOAPODS: 1.10.1
48+
COCOAPODS: 1.12.1

0 commit comments

Comments
 (0)