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

[Firebase_Auth]: MicrosoftCredentials not working in signInWithCredential #16598

Open
1 task done
alfie-trbc opened this issue Nov 14, 2024 · 1 comment
Open
1 task done
Labels
Needs Attention This issue needs maintainer attention. platform: android Issues / PRs which are specifically for Android. platform: ios Issues / PRs which are specifically for iOS. plugin: auth type: documentation Improvements or additions to documentation

Comments

@alfie-trbc
Copy link

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

@alfie-trbc alfie-trbc added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Nov 14, 2024
@SelaseKay SelaseKay added type: documentation Improvements or additions to documentation plugin: auth platform: android Issues / PRs which are specifically for Android. platform: ios Issues / PRs which are specifically for iOS. and removed type: bug Something isn't working labels Nov 14, 2024
@SelaseKay
Copy link
Contributor

Hi @alfie-trbc, thanks for the report. signInWithCredential is indeed not supported for Microsoft as stated here. The documentation has to be updated accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. platform: android Issues / PRs which are specifically for Android. platform: ios Issues / PRs which are specifically for iOS. plugin: auth type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants