Skip to content

🚀 [auth] Include access token and ID token in auth result #8316

Open

Description

@henribru

The upstream SDKs for iOS, Android and web allow you to get the user, additional user info, the access token and the ID token after doing an OpenID Connect sign-in. For the access token and the ID token:

However, this wrapper only seems to expose the user and the additional user info. The auth result is handled by promiseWithAuthResult on Android and iOS, and you can see that they only return those two:

On the React Native side the result goes on to _setUserCredential: https://github.com/invertase/react-native-firebase/blob/main/packages/auth/lib/index.js#L181

It would be useful to have parity with the upstream by including the tokens as well.

Activity

  1. github-actions commented on Mar 11, 2025

    @github-actions
    Contributor

    Hello 👋, to help manage issues we automatically close stale issues.

    This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

    This issue will be closed in 15 days if no further activity occurs.

    Thank you for your contributions.

  2. mikehardy commented on Mar 26, 2025

    @mikehardy
    Collaborator

    Wait, this was not only a good one, it was exceptionally well-researched. Sorry for the close/reopen noise @henribru and for not responding how well done the issue was - it was so good I just mentally enqueued it for "as soon as I have time", but haven't had time yet.

  3. sagnik2001 commented on May 16, 2026

    @sagnik2001

    Hi, I’ve opened a PR to address this issue: #9025

    The PR exposes OAuth credential data on UserCredential results for Auth flows, including:

    • providerId
    • accessToken
    • idToken
    • secret

    It includes Android, iOS, JS/web wrapper, TypeScript type, and Jest test updates.

    Happy to adjust the API shape or implementation based on maintainer feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions