Skip to content

Instantly share code, notes, and snippets.

@ptruiz
Created October 13, 2020 00:01
Show Gist options
  • Save ptruiz/d9a5f0c25f4c87ab2fa79fa92d2a915e to your computer and use it in GitHub Desktop.
Save ptruiz/d9a5f0c25f4c87ab2fa79fa92d2a915e to your computer and use it in GitHub Desktop.
//Create Google Auth credentials to pass to Firebase
final GoogleAuthCredential googleAuthCredential =
GoogleAuthProvider.credential(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
//Authenticate against Firebase with Google credentials
await firebaseAuth.signInWithCredential(googleAuthCredential).then((userCredential) => {
setState(() => {
user = userCredential
})
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment