Skip to content

fix(auth): keep provider photo URLs and Facebook scopes - #18843

Open
SelaseKay wants to merge 4 commits into
mainfrom
fix/auth-photourl-tenantid-facebook
Open

SelaseKay wants to merge 4 commits into
mainfrom
fix/auth-photourl-tenantid-facebook

Conversation

@SelaseKay

@SelaseKay SelaseKay commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

Two silent-wrong Auth paths, neither of which #18820 covers (that PR is Yahoo, ActionCodeSettings, and updateProfile).

On iOS, PigeonParser.getProviderData wrote the provider photo as photoURL. Dart UserInfo.fromJson reads photoUrl, which is also what Android writes. Provider photos from Apple were always null in Dart. This PR only changes that map key. isEmailVerified is unchanged. macOS uses the same Swift file.

convertToOAuthProvider already kept scopes and custom parameters for Google, Microsoft, GitHub, Apple, Twitter, and Yahoo. Yahoo landed on main in #18820. Facebook went through unconverted, so signInWithProvider dropped Facebook scopes and parameters. The new branch matches the Google and Yahoo ones, including .cast<String, String>() on parameters. This branch keeps both.

Related Issues

None found.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Test plan

  • flutter test on convert_auth_provider_test.dart and user_info_test.dart.
  • iOS simulator, Auth emulator: should preserve providerData photoURL after reload.
  • CI firebase_auth unit tests and auth e2e.

user_info_test.dart checks that fromJson reads photoUrl. The integration test reads the password provider's photo from currentUser.providerData after updatePhotoURL and reload, which is the map PigeonParser.getProviderData writes. Yahoo and Facebook each have a converter test.

…opes

iOS providerData used a photoURL key Dart never reads, Android ignored a null tenantId, and Facebook sign-in dropped scopes on the method channel.
@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

FirebaseAuth.setTenantId rejects null, so writing it on every auth call throws for apps that have no tenant.
@SelaseKay SelaseKay changed the title fix(auth): keep provider photo URLs, tenantId clears, and Facebook scopes fix(auth): keep provider photo URLs and Facebook scopes Oct 22, 2026
Yahoo landed on main in the same converter. Both branches and both tests stay.
fromJson stays green if the Apple provider map goes back to photoURL. This reload test reads the password provider photo, which is the value getProviderData writes.

This branch has not been deployed

No deployments
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.

1 participant