Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
48fc76f
refactor(auth): convert package sources to TypeScript
russellwheatley Apr 20, 2026
f7e3edb
refactor(auth): split modular and namespaced TypeScript surfaces
russellwheatley Apr 21, 2026
0872c24
refactor(auth): type namespaced module and native bridge
russellwheatley Apr 21, 2026
229cea0
refactor(auth): align modular API with firebase-js-sdk
russellwheatley Apr 21, 2026
abf22c2
chore: port over public auth types
russellwheatley Apr 21, 2026
314545a
test(auth): add type coverage and compare-types wiring
russellwheatley Apr 21, 2026
9395382
refactor(auth): reduce compare-types drift from firebase-js-sdk
russellwheatley Apr 21, 2026
4c2efa4
chore: remove unneeded modular/index.ts
russellwheatley Apr 23, 2026
d68dadc
refactor: some runtimes moved to modular, fixed up compare script
russellwheatley Apr 23, 2026
abc3447
fix: remove duplicate type aliases
russellwheatley Apr 24, 2026
6dab56b
fix: clean up auth index.ts exports
russellwheatley Apr 24, 2026
95d2de3
fix: password policy to use TS
russellwheatley Apr 24, 2026
e861fb9
fix: update types for auth providers
russellwheatley Apr 24, 2026
a84e011
refactor: remove ts no-check and type properly
russellwheatley Apr 24, 2026
99f20f1
refactor: web TS implementation
russellwheatley Apr 24, 2026
0507718
fix(auth): phoneauthprovider, remove additional native call
russellwheatley Apr 24, 2026
c33df00
refactor: auth and internal auth type
russellwheatley Apr 27, 2026
29e95c9
Merge branch 'main' into auth-typescript
russellwheatley Apr 27, 2026
e70785c
refactor: use modular types rather than deprecated namespace types
russellwheatley Apr 27, 2026
94cbcb2
chore: remove unused function
russellwheatley Apr 27, 2026
67562b5
chore: annotate namespace types as deprecated
russellwheatley Apr 27, 2026
cf8e1d6
chore: use multifactor internal type
russellwheatley Apr 27, 2026
dad4684
fix: useEmulator type and internal logic
russellwheatley Apr 27, 2026
9598bfd
refactor: User public api should use modular api
russellwheatley Apr 27, 2026
b2c7d11
refactor: normalise namespaced types to modular for consumers
russellwheatley Apr 27, 2026
2c0afc4
fix: vertexai and ai packages tsconfig.json
russellwheatley Apr 27, 2026
d5b597e
chore: remove namespace types from auth modular public types
russellwheatley Apr 27, 2026
118f3e1
test: fix tests after TS migration
russellwheatley Apr 30, 2026
1fd7588
test: fix some test mixing modular/namespace
russellwheatley Apr 30, 2026
157657a
fix: namespace "firebase" auth type
russellwheatley Apr 30, 2026
852266d
fix: update namespace types
russellwheatley Apr 30, 2026
c8f25f2
test: fix last remaining unit tests
russellwheatley Apr 30, 2026
4ade4a8
chore: fix type-test and export runtime types from modular.ts
russellwheatley Apr 30, 2026
47a59eb
test: fix jest test coverage which inherited repo wide include causin…
russellwheatley Apr 30, 2026
01ff415
fix: deprecated modular arg breaking e2e tests
russellwheatley May 1, 2026
b4164ba
fix: auth listener logic
russellwheatley May 1, 2026
479e941
chore: update error message for e2e tests
russellwheatley May 1, 2026
1dd6f62
test: check that all user credential properties are available to cons…
russellwheatley May 1, 2026
1da56b5
Merge branch 'main' into auth-typescript
russellwheatley May 1, 2026
2cb8bfe
chore: update auth typedoc
russellwheatley May 1, 2026
8ced923
chore: extend tsdoc to stop warnings
russellwheatley May 1, 2026
25f9d3a
chore: update auth config with more API with different shape
russellwheatley May 1, 2026
43be235
fix: validatePassword modular API type
russellwheatley May 1, 2026
86bb09e
test: update error message contain
russellwheatley May 1, 2026
4cb8cf1
Merge branch 'main' into auth-typescript
russellwheatley May 12, 2026
6018035
chore: move auth config to latest implementation
russellwheatley May 12, 2026
1c265d6
yarn.lock
russellwheatley May 12, 2026
ecb6b65
chore: auth remove baseUrl from tsconfig.json
russellwheatley May 12, 2026
4e0a8b3
chore: fix path in config/auth.ts
russellwheatley May 13, 2026
0d04ae8
fix: use requiredFirebaseTypes to get JS auth types
russellwheatley May 13, 2026
34db482
refactor(auth): align ParsedToken type with Firebase JS SDK
russellwheatley May 13, 2026
938d59f
refactor(auth)!: align auth enum value types with Firebase JS SDK
russellwheatley May 13, 2026
b4bba4a
refactor(auth)!: align connectAuthEmulator options with Firebase JS SDK
russellwheatley May 13, 2026
914723e
refactor(auth)!: align OAuthProvider credential options
russellwheatley May 13, 2026
ee7f27f
refactor(auth)!: align email auth credentials
russellwheatley May 13, 2026
8e33664
refactor(auth)!: align phone auth credentials
russellwheatley May 13, 2026
d656631
refactor(auth)!: align github auth credentials
russellwheatley May 13, 2026
45d52e0
refactor(auth)!: align google auth credentials
russellwheatley May 13, 2026
db3a6ee
refactor(auth)!: align TwitterAuthProvider credential shape
russellwheatley May 13, 2026
6690c90
refactor(auth)!: align FacebookAuthProvider credential shape
russellwheatley May 13, 2026
90029e8
refactor(auth)!: align PhoneAuthProvider verify signature
russellwheatley May 13, 2026
655b4d5
refactor(auth)!: add OAuthProvider credentialFromJSON
russellwheatley May 13, 2026
299b8b5
refactor(auth)!: align TotpMultiFactorGenerator types
russellwheatley May 13, 2026
c3ed87b
refactor(auth)!: add GithubAuthProvider extraction helpers
russellwheatley May 13, 2026
29056da
refactor(auth)!: align Facebook auth provider helpers
russellwheatley May 14, 2026
09bc2fc
refactor(auth)!: align Google auth provider helpers
russellwheatley May 15, 2026
1ba05c9
refactor(auth)!: align Twitter auth provider helpers
russellwheatley May 15, 2026
9bf5d36
Merge branch 'main' into auth-typescript
russellwheatley May 15, 2026
2de435b
fix: implement remaining JS SDK gaps, and PR review items
mikehardy Jun 16, 2026
e78eb43
Merge branch 'main' of github.com:invertase/react-native-firebase int…
mikehardy Jun 16, 2026
ebaf134
fix(auth): wire up credentials to native and other fixes
mikehardy Jun 17, 2026
8e15f2b
fix(auth): silence TypeDoc warning for OAuthCredentialParams
mikehardy Jun 17, 2026
6279c84
test(ci): run iOS e2e on macos-26 to match local dev
mikehardy Jun 17, 2026
d325ed0
test(ios): target iPhone 17 simulator on macos-26 / Xcode latest
mikehardy Jun 17, 2026
f1b59d4
fix: deep PR review and related fixes for type gaps
mikehardy Jun 17, 2026
7afc02f
fix(auth): final deep review pass, docs reorg/prep
mikehardy Jun 17, 2026
56261f8
Merge branch 'main' into auth-typescript
mikehardy Jun 17, 2026
4172954
test(ios): additional instrumentation and mitigation for e2e orchestr…
mikehardy Jun 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
220 changes: 220 additions & 0 deletions .github/scripts/compare-types/configs/auth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
/**
* Known differences between the firebase-js-sdk @firebase/auth public
* API and the @react-native-firebase/auth modular API.
*
* Each entry must have a `name` and a `reason`. Any undocumented
* difference or stale entry will fail `yarn compare:types`.
*
* Platform shorthand used in reasons:
* - iOS/Android: native Firebase Auth SDK
* - Other/All: Other/Hermes + Other/Web (firebase-js-sdk JS bridge)
* - Other/Hermes: react-native-macos, Windows RN, etc. (no DOM)
* - Other/Web: true browser/DOM context
*/

import type { PackageConfig } from '../src/types';

const config: PackageConfig = {
nameMapping: {},

missingInRN: [
{
name: 'initializeRecaptchaConfig',
reason:
'iOS/Android: native SDKs own phone verification. Other/Hermes: not applicable (no DOM). Other/Web: not implemented yet; firebase-js-sdk support is possible.',
},
{
name: 'AuthErrorCodes',
reason:
'iOS/Android: native auth error code strings. Other/All: not exported yet; firebase-js-sdk re-export is possible.',
},
{
name: 'browserCookiePersistence',
reason:
'iOS/Android: not applicable. Other/Hermes: not applicable. Other/Web: not exported yet; firebase-js-sdk browser persistence is possible.',
},
{
name: 'browserLocalPersistence',
reason:
'iOS/Android: not applicable. Other/Hermes: not applicable. Other/Web: not exported yet; firebase-js-sdk browser persistence is possible.',
},
{
name: 'browserPopupRedirectResolver',
reason:
'iOS/Android: native provider flows. Other/Hermes: not applicable. Other/Web: not exported yet; firebase-js-sdk popup/redirect resolver is possible.',
},
{
name: 'browserSessionPersistence',
reason:
'iOS/Android: not applicable. Other/Hermes: not applicable. Other/Web: not exported yet; firebase-js-sdk browser persistence is possible.',
},
{
name: 'debugErrorMap',
reason:
'iOS/Android: not exported. Other/All: not implemented yet; firebase-js-sdk error-map selection via initializeAuth is possible.',
},
{
name: 'indexedDBLocalPersistence',
reason:
'iOS/Android: not applicable. Other/Hermes: not applicable. Other/Web: not exported yet; firebase-js-sdk IndexedDB persistence is possible.',
},
{
name: 'inMemoryPersistence',
reason:
'iOS/Android: native SDKs manage persistence. Other/All: not exported yet; firebase-js-sdk inMemoryPersistence via initializeAuth is possible.',
},
{
name: 'prodErrorMap',
reason:
'iOS/Android: not exported. Other/All: not implemented yet; firebase-js-sdk error-map selection via initializeAuth is possible.',
},
{
name: 'ReactNativeAsyncStorage',
reason:
'iOS/Android: persistence delegated to native SDKs. Other/Hermes: not exported yet; firebase-js-sdk React Native persistence via initializeAuth is possible.',
},
{
name: 'RecaptchaParameters',
reason:
'iOS/Android: not applicable. Other/Hermes: not applicable. Other/Web: not exported; browser reCAPTCHA configuration only.',
},
{
name: 'RecaptchaVerifier',
reason:
'iOS/Android: native verification. Other/Hermes: not applicable (no DOM). Other/Web: not implemented yet; firebase-js-sdk RecaptchaVerifier is possible.',
},
{
name: 'SAMLAuthProvider',
reason:
'iOS/Android: not exported. Other/Hermes: not applicable. Other/Web: not exported yet; firebase-js-sdk SAML provider is possible.',
},
],

extraInRN: [
{
name: 'AppleAuthProvider',
reason:
'Deprecated RN Firebase helper for Sign in with Apple. Prefer OAuthProvider("apple.com"). Retained for compatibility; firebase-js-sdk uses OAuthProvider only.',
},
{
name: 'NativeFirebaseAuthError',
reason:
'RN Firebase-specific native bridge auth error type used in place of the firebase-js-sdk AuthError export.',
},
{
name: 'OIDCAuthProvider',
reason:
'Deprecated RN Firebase OIDC helper. Prefer OAuthProvider("oidc.<suffix>"). Retained for compatibility; firebase-js-sdk uses OAuthProvider only.',
},
{
name: 'OIDCProvider',
reason:
'Deprecated with OIDCAuthProvider. Prefer OAuthProvider for OIDC flows.',
},
{
name: 'PhoneAuthState',
reason:
'RN Firebase-specific enum-like object describing native phone-auth listener states. iOS/Android only; Other uses js-sdk phone flows instead of verifyPhoneNumber().',
},
{
name: 'PhoneAuthListener',
reason:
'RN Firebase-specific listener object returned by verifyPhoneNumber(). iOS/Android only.',
},
{
name: 'PhoneAuthError',
reason:
'RN Firebase-specific phone verification error snapshot type used by native phone-auth listeners. iOS/Android only.',
},
{
name: 'PhoneAuthSnapshot',
reason:
'RN Firebase-specific phone verification snapshot type used by native phone-auth listeners. iOS/Android only.',
},
{
name: 'verifyPhoneNumber',
reason:
'RN Firebase-specific native phone verification listener flow. iOS/Android only; Other/All: use signInWithPhoneNumber / PhoneAuthProvider via js-sdk instead.',
},
{
name: 'setLanguageCode',
reason:
'RN Firebase modular helper for auth.languageCode. iOS/Android: native. Other/All: not delegated yet; firebase-js-sdk languageCode / useDeviceLanguage is possible.',
},
{
name: 'useUserAccessGroup',
reason:
'RN Firebase-specific iOS keychain sharing helper. iOS native only.',
},
{
name: 'getCustomAuthDomain',
reason:
'RN Firebase-specific native auth domain helper on iOS/Android. Other/All: auth.config from firebase-js-sdk may cover this instead (see auth.config in migration guide).',
},
{
name: 'AdditionalUserInfoNative',
reason:
'RN Firebase extension type: firebase-js-sdk AdditionalUserInfo core fields plus index signature for extra native bridge keys. Use when typing values from getAdditionalUserInfo or UserCredential.additionalUserInfo that may include provider-specific native fields.',
},
],

differentShape: [
{
name: 'OAuthCredential',
reason:
'RN Firebase OAuthCredential exposes rawNonce for Apple / limited-login flows. OAuth 1.0 token secrets use the inherited AuthCredential.secret field (firebase-js-sdk optional secret on OAuthCredential).',
},
{
name: 'FacebookAuthProvider',
reason:
'RN Firebase exports an extra credential(token, secret) overload for Facebook limited-login nonce behaviour. firebase-js-sdk public types only declare credential(accessToken). credentialFromResult / credentialFromError always return null at runtime today (types match js-sdk). Same runtime applies to GoogleAuthProvider, GithubAuthProvider, TwitterAuthProvider, OAuthProvider, and PhoneAuthProvider — see those entries. iOS/Android: no native extraction planned. Other/Hermes: not delegated. Other/Web: future implementation should delegate to firebase-js-sdk in RNFBAuthModule — do not invest in native iOS/Android extraction.',
},
{
name: 'UserCredential',
reason:
'RN Firebase modular UserCredential includes optional enumerable additionalUserInfo (firebase-js-sdk core fields plus preserved native bridge keys). firebase-js-sdk keeps additionalUserInfo off the public UserCredential interface — use getAdditionalUserInfo there.',
},
{
name: 'isSignInWithEmailLink',
reason:
'iOS/Android: Promise<boolean> via native bridge. Other/All: not aligned yet; firebase-js-sdk synchronous boolean is possible on Other/Hermes and Other/Web.',
},
{
name: 'linkWithRedirect',
reason:
'iOS/Android: resolves immediately with UserCredential. Other/Hermes: not applicable (no DOM). Other/Web: not delegated yet; firebase-js-sdk redirect flow is possible.',
},
{
name: 'reauthenticateWithRedirect',
reason:
'iOS/Android: Promise<void> after native in-app provider flow. Other/Hermes: not applicable. Other/Web: not delegated yet; firebase-js-sdk redirect semantics are possible.',
},
{
name: 'signInWithRedirect',
reason:
'iOS/Android: resolves immediately with UserCredential. Other/Hermes: not applicable. Other/Web: not delegated yet; firebase-js-sdk redirect flow is possible.',
},
{
name: 'OAuthProvider',
reason:
'iOS/Android: retains toObject() and native bridge configuration helpers. Other/Hermes: scopes/custom parameters via js-sdk are possible. Other/Web: full js-sdk OAuthProvider surface is possible; toObject() remains iOS/Android bridge-only. credentialFromResult / credentialFromError always return null at runtime today (types match js-sdk). Same runtime applies to GoogleAuthProvider, GithubAuthProvider, TwitterAuthProvider, FacebookAuthProvider, and PhoneAuthProvider. Other/Web is the future delegation path via firebase-js-sdk; iOS/Android native extraction is not planned.',
},
{
name: 'PhoneAuthProvider',
reason:
'RN Firebase retains native multi-factor verifyPhoneNumber overloads for iOS/Android native bridge methods. MFA also works on Other via firebase-js-sdk through the web bridge (see tests/local-tests); this overload is an intentional RN extension, not a missing Other implementation. credentialFromResult / credentialFromError always return null at runtime today (types match js-sdk). Same runtime applies to GoogleAuthProvider, GithubAuthProvider, TwitterAuthProvider, FacebookAuthProvider, and OAuthProvider. Other/Web js-sdk delegation is the future path for non-null extraction.',
},
{
name: 'TotpMultiFactorGenerator',
reason:
'RN Firebase extension: optional Auth overload for non-default native Firebase apps. firebase-js-sdk uses the default app only.',
},
{
name: 'TotpSecret',
reason:
'iOS/Android: generateQrCodeUrl is Promise<string> via native bridge; openInOtpApp is an RN-only helper. Other/All: js-sdk synchronous generateQrCodeUrl is possible when MFA is supported on Other.',
},
],
};

export default config;
39 changes: 37 additions & 2 deletions .github/scripts/compare-types/src/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import appCheckConfig from '../configs/app-check';
import firestoreConfig from '../configs/firestore';
import firestorePipelinesConfig from '../configs/firestore-pipelines';
import remoteConfigConfig from '../configs/remote-config';
import authConfig from '../configs/auth';
import installationsConfig from '../configs/installations';
import perfConfig from '../configs/perf-config';

const SCRIPT_DIR = path.resolve(__dirname, '..');
const REPO_ROOT = path.resolve(SCRIPT_DIR, '..', '..', '..');
const REPO_ROOT = path.resolve(__dirname, '..', '..', '..', '..');

export interface PackageEntry {
/** Short name used in reports (e.g. "remote-config"). */
Expand Down Expand Up @@ -103,6 +103,41 @@ function optionalFirebasePackage(
}

export const packages: PackageEntry[] = [
{
name: 'auth',
firebaseSdkTypesPaths: [requiredFirebaseTypes('auth')],
rnFirebaseModularFiles: [
path.join(rnDist('auth'), 'types', 'auth.d.ts'),
path.join(rnDist('auth'), 'modular.d.ts'),
],
rnFirebaseSupportFiles: [
path.join(rnDist('auth'), 'index.d.ts'),
path.join(rnDist('auth'), 'constants.d.ts'),
path.join(rnDist('auth'), 'namespaced.d.ts'),
path.join(rnDist('auth'), 'types', 'namespaced.d.ts'),
path.join(rnDist('auth'), 'types', 'internal.d.ts'),
path.join(rnDist('auth'), 'ConfirmationResult.d.ts'),
path.join(rnDist('auth'), 'MultiFactorResolver.d.ts'),
path.join(rnDist('auth'), 'PhoneAuthListener.d.ts'),
path.join(rnDist('auth'), 'PhoneMultiFactorGenerator.d.ts'),
path.join(rnDist('auth'), 'Settings.d.ts'),
path.join(rnDist('auth'), 'TotpMultiFactorGenerator.d.ts'),
path.join(rnDist('auth'), 'TotpSecret.d.ts'),
path.join(rnDist('auth'), 'User.d.ts'),
path.join(rnDist('auth'), 'getMultiFactorResolver.d.ts'),
path.join(rnDist('auth'), 'multiFactor.d.ts'),
path.join(rnDist('auth'), 'providers', 'AppleAuthProvider.d.ts'),
path.join(rnDist('auth'), 'providers', 'EmailAuthProvider.d.ts'),
path.join(rnDist('auth'), 'providers', 'FacebookAuthProvider.d.ts'),
path.join(rnDist('auth'), 'providers', 'GithubAuthProvider.d.ts'),
path.join(rnDist('auth'), 'providers', 'GoogleAuthProvider.d.ts'),
path.join(rnDist('auth'), 'providers', 'OAuthProvider.d.ts'),
path.join(rnDist('auth'), 'providers', 'OIDCAuthProvider.d.ts'),
path.join(rnDist('auth'), 'providers', 'PhoneAuthProvider.d.ts'),
path.join(rnDist('auth'), 'providers', 'TwitterAuthProvider.d.ts'),
],
config: authConfig,
},
{
name: 'storage',
firebaseSdkTypesPaths: [requiredFirebaseTypes('storage')],
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/tests_e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ jobs:
- name: Pre-fetch Javascript bundle
if: contains(matrix.buildmode, 'debug')
run: |
nohup yarn tests:packager:jet-ci &
nohup yarn tests:packager:jet-ci > metro.log 2>&1 &
printf 'Waiting for packager to come online'
until curl --output /dev/null --silent --head --fail http://localhost:8081/status; do
printf '.'
Expand Down Expand Up @@ -388,6 +388,15 @@ jobs:
name: simulator-${{ matrix.buildmode }}-${{ matrix.iteration }}_log
path: simulator.log

- name: Upload Metro log
# https://github.com/actions/upload-artifact/releases
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
continue-on-error: true
if: always() && contains(matrix.buildmode, 'debug')
with:
name: metro-${{ matrix.buildmode }}-${{ matrix.iteration }}_log
path: metro.log

- name: Upload Screen Recording
# https://github.com/actions/upload-artifact/releases
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
Loading
Loading