Skip to content

Add phone symbols to react native export #5673

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

Merged
merged 3 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/perfect-ducks-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/auth": patch
---

Export Phone sign in functionality in React Native entrypoint (except for RecaptchaVerifier)
15 changes: 15 additions & 0 deletions packages/auth/index.rn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ import { getReactNativePersistence } from './src/platform_react_native/persisten
// Core functionality shared by all clients
export * from './index.shared';

// Export some Phone symbols
// providers
export { PhoneAuthProvider } from './src/platform_browser/providers/phone';

// strategies
export {
signInWithPhoneNumber,
linkWithPhoneNumber,
reauthenticateWithPhoneNumber,
updatePhoneNumber
} from './src/platform_browser/strategies/phone';

// MFA
export { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';

/**
* An implementation of {@link Persistence} of type 'LOCAL' for use in React
* Native environments.
Expand Down
3 changes: 3 additions & 0 deletions packages/auth/src/platform_browser/strategies/phone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ class ConfirmationResultImpl implements ConfirmationResult {
*
* For abuse prevention, this method also requires a {@link ApplicationVerifier}.
* This SDK includes a reCAPTCHA-based implementation, {@link RecaptchaVerifier}.
* This function can work on other platforms that do not support the
* {@link RecaptchaVerifier} (like React Native), but you need to use a
* third-party {@link ApplicationVerifier} implementation.
*
* @example
* ```javascript
Expand Down