[firebase_auth] Web: Getting null access token from Google Sign in #3276
Labels
blocked: customer-response
Waiting for customer response, e.g. more information was requested.
platform: web
Issues / PRs which are specifically for web.
plugin: auth
Describe the bug
After using
package:google_sign_in
(on web) to get aGoogleSignInAccount
, then using that to get aGoogleSignInAuthentication
, I cannot use that authentication as an argument forGoogleAuthProvider.credential
. The error I get:First off, notice how the error says at least one, while the assertion actually checks both. Second, I noticed removing this line allowed me to sign in. For context, the error here is that
accessToken
is null. I could post this issue for google_sign_in, but since I noticed this assertion doesn't seem to prevent me from actually logging in, I thought I'd post it here instead.To Reproduce
Here's my code:
Expected behavior
Either
accessToken
should be non-null (as it is usingsignInWithPopup
) or FIrebaseAuth should not check that since I am able to log in and download Firestore data just fine without it.Additional context
Two things:
FirebaseAuth.signInWithPopup
works just fine for web. I don't know whyaccessToken
isn't null there, but the main difference is that usingsignInWithPopup
, I don't need to callGoogleAuthProvider.credential
, which has the assertion.Flutter doctor
Run
flutter doctor
and paste the output below:Also, here are my relevant dependencies:
The text was updated successfully, but these errors were encountered: