Skip to content

Commit f31f760

Browse files
committed
Default to email permission for FB
1 parent 34d338b commit f31f760

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { GoogleSignin } from 'react-native-google-signin';
44
const Facebook = {
55
login: (permissions) => {
66
return new Promise((resolve, reject) => {
7-
FBLoginManager.loginWithPermissions(permissions, (error, data) => {
7+
FBLoginManager.loginWithPermissions(permissions || ['email'], (error, data) => {
88
if (!error) {
99
resolve(data.credentials.token);
1010
} else {

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ const FireAuth = class {
9090
this.user.sendEmailVerification();
9191
}
9292

93-
facebookLogin = () => {
94-
Auth.Facebook.login()
93+
facebookLogin = (permissions) => {
94+
Auth.Facebook.login(permissions)
9595
.then((token) => (
9696
firebase.auth()
9797
.signInWithCredential(firebase.auth.FacebookAuthProvider.credential(token))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-firebase-auth",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Simplified Firebase authentication with social platform support",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)