-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to specify scopes for Google Services when using Google Sign In #19
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few questions before I continue with the PR test and merge
@@ -17,7 +17,7 @@ class FirebaseAuthenticationService { | |||
final Logger? log; | |||
|
|||
final firebaseAuth = FirebaseAuth.instance; | |||
final GoogleSignIn _googleSignIn = GoogleSignIn(); | |||
GoogleSignIn? _googleSignIn; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the benefit of going to a nullable GoogleSignIn
object and not using late
?
@@ -35,7 +35,7 @@ class FirebaseAuthenticationService { | |||
Future<UserCredential> _signInWithCredential( | |||
AuthCredential credential, | |||
) async { | |||
return firebaseAuth.signInWithCredential(credential); | |||
return await firebaseAuth.signInWithCredential(credential); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do we need to await here if the calling function should be awaiting the future?
@@ -597,17 +599,20 @@ class FirebaseAuthenticationResult { | |||
|
|||
/// Firebase additional user information | |||
final AdditionalUserInfo? additionalUserInfo; | |||
final String? oAuthAccessToken; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the change of repository to your own repo
pubspec.yaml
Outdated
@@ -2,7 +2,7 @@ name: stacked_firebase_auth | |||
description: A service class that provides Firebase Authentication Functionality on a single api | |||
version: 2.20.0 | |||
homepage: https://stacked.filledstacks.com/ | |||
repository: https://github.com/Stacked-Org/firebase_auth.git | |||
repository: https://github.com/pmmucsd/firebase_auth.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will not go in.
Adds the ability to pass in a list of scopes and returns the oAuth access token with the FirebaseAuthenticationResult. This enables developers to use this library to request access to Google Services like Drive and Gmail in the signup flow.