You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(auth): `signInWithPhoneNumber` method fixed - prescottprue#374
* feat(auth): `login` supports `signInWithPhoneNumber` by passing `phoneNumber` and `applicationVerifier`
* feat(examples): material example includes example usage of `login` using `phoneNumber` (multi step process unlike other usage of `login`)
* feat(docs): auth docs updated with `signInWithPhoneNumber` and additions to `login`
credential : firebase.auth.AuthCredential // created using specific provider
72
+
credential : [firebase.auth.AuthCredential](https://firebase.google.com/docs/reference/js/firebase.auth.AuthCredential.html) // created using specific provider
73
73
}
74
74
```
75
75
The credential parameter is a firebase.auth.AuthCredential specific to the provider (i.e. `firebase.auth.GoogleAuthProvider.credential(null, 'some accessToken')`). For more details [please view the Firebase API reference](https://firebase.google.com/docs/reference/js/firebase.auth.GoogleAuthProvider#methods)
@@ -87,6 +87,13 @@ export default firebaseConnect()(SomeComponent) // or withFirebase(SomeComponent
87
87
profile: Object // required (optional if updateProfileOnLogin: false config set)
88
88
}
89
89
```
90
+
* phone number (runs `ref.signInWithPhoneNumber(phoneNumber, applicationVerifier)`). Automatic profile creation is enabled by default if you are using the `userProfile` config option. `updateProfileOnLogin` config option can be set to `false`in order to prevent this behavior.
[**Promise**][promise-url] that resolves with the response from firebase's login method (an [**Object**][object-url]). `credential` property is also included if using oAuth provider.
@@ -121,7 +128,7 @@ props.firebase.login({
121
128
122
129
*Credential*
123
130
```js
124
-
// `googleUser` from the onsuccess Google Sign In callback.
131
+
// `googleUser` from the onsuccess Google Sign In callback
Verify a password reset code from password reset email.
261
267
262
-
Calls Firebase's `firebase.auth().signInWithPhoneNumber()`. If there is an error, it is added into redux state under `state.firebase.authError`.
268
+
Signs in using a phone number in an async pattern (i.e. requires calling a second method). Calls Firebase's [`firebase.auth().signInWithPhoneNumber()`](https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithPhoneNumber). If there is an error, it is added into redux state under `state.firebase.authError`.
269
+
270
+
From Firebase's docs:
271
+
272
+
> Asynchronously signs in using a phone number. This method sends a code via SMS to the given phone number, and returns a [firebase.auth.ConfirmationResult](https://firebase.google.com/docs/reference/js/firebase.auth.ConfirmationResult.html). After the user provides the code sent to their phone, call [firebase.auth.ConfirmationResult#confirm](https://firebase.google.com/docs/reference/js/firebase.auth.ConfirmationResult.html#confirm) with the code to sign the user in.
* `phoneNumber` [**String**][string-url] - The user's phone number inE.164format (e.g. `+16505550101`).
302
+
*`applicationVerifier` [**firebase.auth.ApplicationVerifier**][firebase-app-verifier] `required`- App verifier made with Firebase's `RecaptchaVerifier`
[**Promise**][promise-url] - Resolves with [firebase.auth.ConfirmationResult](https://firebase.google.com/docs/reference/js/firebase.auth.ConfirmationResult.html)
Copy file name to clipboardExpand all lines: docs/integrations/react-native.md
+1-190
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Passing in an instance also allows for libraries with similar APIs (such as [`re
46
46
};
47
47
```
48
48
49
-
Full `react-native-firebase` example app source with styling available [in the react-native-firebase complete example](https://github.com/prescottprue/react-redux-firebase/tree/v2.0.0/examples/complete/react-native-firebase).
49
+
Full `react-native-firebase` example app source with styling available [in the react-native-firebase complete example](https://github.com/prescottprue/react-redux-firebase/tree/master/examples/complete/react-native-firebase).
50
50
51
51
### Setup
52
52
1. Run `create-react-native-app my-app`
@@ -77,195 +77,6 @@ Instantiate a Firebase instance outside of `react-redux-firebase` then pass it i
77
77
1. Copy your client id out of the `GoogleService-info.plist` file (should end in `.apps.googleusercontent.com`)
78
78
1. Place the client id into `iosClientId` variable within the example
79
79
80
-
## Example App Snippets
81
-
82
-
This snippet is a condensed version of [react-native complete example](/examples/complete/react-native).
83
-
84
-
**NOTE**: The API used in this snippet [changes in `v2.0.0`](http://docs.react-redux-firebase.com/history/v2.0.0/docs/recipes/react-native.html#jsweb), if you are starting a new project, the new syntax is suggested
0 commit comments