Skip to content

firebaseAuth. signInWithCredential(credential) return error  #11568

@armanhadifatah

Description

@armanhadifatah

Bug report

Using firebase auth for google sign in but when I call _firebaseAuth.signInWithCredential(credential) , I get this weird error

_TypeError (type 'List<Object?>' is not a subtype of type 'int?' in type cast)

this is my code

  Future<UserCredential> signInWithGoogle() async {
    final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn();
    final GoogleSignInAuthentication? googleAuth =
        await googleUser?.authentication;
    final credential = GoogleAuthProvider.credential(
      accessToken: googleAuth?.accessToken,
      idToken: googleAuth?.idToken,
    );
    return await _firebaseAuth.signInWithCredential(credential);
  }

This was working before but it has been a day or two it doesn't work

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions