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

fix(auth, types): instantiating OAuthProvider returns OAuthProvider #8231

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

mikehardy
Copy link
Collaborator

Description

previously 'new' on OAuthProvider returned AuthProvider which had none of the necessary OAuthProvider interface methods

Our types stray pretty far from firebase-js-sdk here, they do not allow you to new an OAuthProvider, however, their OAuthProvider does participate in a type inheritance chain that goes to BaseOAuthProvider, to FederatedAuthProvider which implements AuthProvider. So this change at least brings us slightly more into harmony

https://github.com/firebase/firebase-js-sdk/blob/144bc370942f1bdd00f482b40df2581e7ed83a0a/packages/auth/src/core/providers/oauth.ts#L63-L65

Related issues

Discussed

Release Summary

single conventional commit

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 8:25pm

previously it returned AuthProvider which had none
of the necessary OAuthProvider interface methods
@mikehardy mikehardy force-pushed the @mikehardy/OAuthProvider-type branch from 6cb572e to f611db1 Compare January 16, 2025 20:17
@mikehardy mikehardy merged commit e068e12 into main Jan 16, 2025
19 checks passed
@mikehardy mikehardy deleted the @mikehardy/OAuthProvider-type branch January 16, 2025 20:47
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