8000 [Firebase_Auth]: MicrosoftCredentials not working in signInWithCredential · Issue #16598 · firebase/flutterfire · GitHub
[go: up one dir, main page]

Skip to content

[Firebase_Auth]: MicrosoftCredentials not working in signInWithCredential #16598

@alfie-trbc

Description

@alfie-trbc

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Auth

Which platforms are affected?

Android, iOS

Description

Based on the Code Documentation which I initially checked, 3rd party login is feasible in microsoft and just get the accessToken and pass that to signInWithCredential:

This is the code documentation under [MicrosoftAuthProvider] class :
image

BUT in firebase documentation it says that this is not supported:
image

The error I'm encountering is:
([firebase_auth/channel-error] "dev.flutter.pigeon.firebase_auth_platform_interface.FirebaseAuthHostApi.signInWithCredential".)

Is microsoft really not supported via signInWithCredential? if that so, why the documentation under MicrosoftAuthProvider contradict the official firebase documentation?

Reproducing the issue

1.) I used flutter_web_auth_2 package for 3rd party authorize

2.) I get the auth code to use for getting the accessToken and refreshToken from microsoft API

3.) After that I created a credential like this:

  final credential = MicrosoftAuthProvider.credential(accessToken);

4.) passed the credential in signInWithCredential

  final userCredential = await auth.signInWithCredential(credential);

5.) It will get an error under signInWithCredential:

([firebase_auth/channel-error] "dev.flutter.pigeon.firebase_auth_platform_interface.FirebaseAuthHostApi.signInWithCredential".)

Firebase Core version

3.5.0

Flutter Version

3.24.4

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs AttentionThis issue needs maintainer attention.platform: androidIssues / PRs which are specifically for Android.platform: iosIssues / PRs which are specifically for iOS.plugin: authtype: documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0