Skip to content
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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

pmmucsd
Copy link

@pmmucsd pmmucsd commented Mar 6, 2024

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.

Copy link
Contributor

@FilledStacks FilledStacks left a 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;
Copy link
Contributor

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);
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition here.

Copy link
Contributor

@FilledStacks FilledStacks left a 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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants