File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,15 @@ class GoogleCloudProvider {
27
27
var googleSignInAccount = await _googleSignIn.signIn ();
28
28
final GoogleSignInAuthentication ? googleAuth =
29
29
await googleSignInAccount? .authentication;
30
- final credential = GoogleAuthProvider .credential (
31
- accessToken: googleAuth? .accessToken,
32
- idToken: googleAuth? .idToken,
33
- );
34
- await _firebaseAuthInstance.signInWithCredential (credential);
30
+ if (googleAuth != null )
31
+ {
32
+ final credential = GoogleAuthProvider .credential (
33
+ accessToken: googleAuth? .accessToken,
34
+ idToken: googleAuth? .idToken,
35
+ );
36
+ await _firebaseAuthInstance.signInWithCredential (credential);
37
+ }
38
+
35
39
36
40
if (googleSignInAccount != null ) {
37
41
// Process successful sign-in
You can’t perform that action at this time.
0 commit comments