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
If you don't want to use [react-native-oauth](https://github.com/fullstackreact/react-native-oauth), you can use other library such as [react-native-facebook-login](https://github.com/magus/react-native-facebook-login).
255
+
256
+
```javascript
257
+
var {FBLogin, FBLoginManager} =require('react-native-facebook-login');
258
+
259
+
var Login =React.createClass({
260
+
render:function() {
261
+
return (
262
+
<FBLogin
263
+
onLogin={function(data){
264
+
console.log("Logged in!");
265
+
console.log(data);
266
+
let token =data.credentials.token
267
+
firestack.signInWithProvider('facebook', token, '') // facebook need only access token.
268
+
.then((user)=>{
269
+
console.log(user)
270
+
})
271
+
}}
272
+
/>
273
+
);
274
+
}
275
+
});
276
+
```
277
+
253
278
If the `signInWithProvider()` method resolves correct and we have already set up our `listenForAuth()` method properly, it will fire and we'll have a logged in user through Firebase.
0 commit comments