Skip to content

Commit

Permalink
Add phone symbols to react native export (#5673)
Browse files Browse the repository at this point in the history
* Add phone symbols to react native export

* Add changeset

* Add comment to signInWithPhoneNumber
  • Loading branch information
sam-gc committed Oct 27, 2021
1 parent dfed7f8 commit 4594d3f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
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

0 comments on commit 4594d3f

Please sign in to comment.