Skip to content
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

Login and signup with facebook and email working #173

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions app/screens/LoginScreen/loginScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ScrollView,
} from "react-native";
import { AccessToken, LoginManager } from "react-native-fbsdk";
import { f, auth } from "../../../config/config.js";
import { f, auth } from "../../../config/config.example.js";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. We should use config.js and not config.example.js.
The idea of having config.example.js is to give a template to the developer to setup the config file and the file should be renamed to config.js when doing the development. So please revert this change.

import * as EmailValidator from "email-validator";
import styles from "./style";
import { SocialIcon } from "react-native-elements";
Expand Down Expand Up @@ -68,7 +68,7 @@ export default class LoginScreen extends Component {
};

onPressLogin() {
LoginManager.logInWithReadPermissions(["public_profile", "email"]).then(
LoginManager.logInWithPermissions(["public_profile", "email"]).then(
result => this._handleCallBack(result),
function (error) {
alert("Login fail with error: " + error);
Expand Down
4 changes: 2 additions & 2 deletions app/screens/SignupScreen/signupScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import styles from "./style";
import * as EmailValidator from "email-validator";
import { AccessToken, LoginManager } from "react-native-fbsdk";
import { f, auth } from "../../../config/config.js";
import { f, auth } from "../../../config/config.example.js";
import { SocialIcon } from "react-native-elements";

export default class SignUpScreen extends Component {
Expand Down Expand Up @@ -41,7 +41,7 @@ export default class SignUpScreen extends Component {
}

onPressLogin() {
LoginManager.logInWithReadPermissions(["public_profile", "email"]).then(
LoginManager.logInWithPermissions(["public_profile", "email"]).then(
result => this._handleCallBack(result),
function (error) {
alert("Login fail with error: " + error);
Expand Down
5 changes: 4 additions & 1 deletion config/config.example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import firebase from "firebase";
import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/database';
import 'firebase/compat/storage';

var config = {
apiKey: "",
Expand Down