feat(auth): expose OAuth credential tokens in user credential result#9025
feat(auth): expose OAuth credential tokens in user credential result#9025sagnik2001 wants to merge 2 commits into
Conversation
|
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Firebase Auth module by ensuring that OAuth credential tokens, such as access tokens and ID tokens, are correctly passed from native platforms (Android and iOS) and the web implementation to the JavaScript layer. This change addresses a long-standing gap in the UserCredential result, enabling developers to access provider-specific tokens after successful authentication. Highlights
Using Gemini Code AssistThe 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
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 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request implements OAuth credential support in the UserCredential object for Android, iOS, and Web, enabling access to provider tokens and secrets. It includes updated TypeScript definitions, native mapping logic, and new tests. Reviewer feedback suggests using SharedUtils.mapPutValue on Android for cleaner code and applying consistent null handling for the provider ID on iOS to ensure safety across the React Native bridge.
Related issues
Fixes #8316
Release Summary
Include OAuth credential token data on Auth
UserCredentialresults.Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/**/e2ejesttests added or updated inpackages/**/__tests__Test Plan
Ran:
Also checked Android formatting for the touched Java file:
JAVA_HOME=/opt/homebrew/opt/openjdk PATH=/opt/homebrew/opt/openjdk/bin:$PATH ./node_modules/.bin/google-java-format --set-exit-if-changed --dry-run packages/auth/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthModule.javaNo e2e test was added because this change is covered at the bridge serialization/type level and a full OIDC runtime test requires provider configuration.