Skip to content

Commit 4594d3f

Browse files
authored
Add phone symbols to react native export (#5673)
* Add phone symbols to react native export * Add changeset * Add comment to signInWithPhoneNumber
1 parent dfed7f8 commit 4594d3f

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.changeset/perfect-ducks-deny.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/auth": patch
3+
---
4+
5+
Export Phone sign in functionality in React Native entrypoint (except for RecaptchaVerifier)

packages/auth/index.rn.ts

+15
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ import { getReactNativePersistence } from './src/platform_react_native/persisten
3535
// Core functionality shared by all clients
3636
export * from './index.shared';
3737

38+
// Export some Phone symbols
39+
// providers
40+
export { PhoneAuthProvider } from './src/platform_browser/providers/phone';
41+
42+
// strategies
43+
export {
44+
signInWithPhoneNumber,
45+
linkWithPhoneNumber,
46+
reauthenticateWithPhoneNumber,
47+
updatePhoneNumber
48+
} from './src/platform_browser/strategies/phone';
49+
50+
// MFA
51+
export { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';
52+
3853
/**
3954
* An implementation of {@link Persistence} of type 'LOCAL' for use in React
4055
* Native environments.

packages/auth/src/platform_browser/strategies/phone.ts

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ class ConfirmationResultImpl implements ConfirmationResult {
7878
*
7979
* For abuse prevention, this method also requires a {@link ApplicationVerifier}.
8080
* This SDK includes a reCAPTCHA-based implementation, {@link RecaptchaVerifier}.
81+
* This function can work on other platforms that do not support the
82+
* {@link RecaptchaVerifier} (like React Native), but you need to use a
83+
* third-party {@link ApplicationVerifier} implementation.
8184
*
8285
* @example
8386
* ```javascript

0 commit comments

Comments
 (0)