diff --git a/.DS_Store b/.DS_Store index 67fe30e..90eb62a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/expo_project/.DS_Store b/expo_project/.DS_Store new file mode 100644 index 0000000..3b16536 Binary files /dev/null and b/expo_project/.DS_Store differ diff --git a/expo_project/App.js b/expo_project/App.js index 70ff310..cab2e80 100644 --- a/expo_project/App.js +++ b/expo_project/App.js @@ -1,14 +1,21 @@ import React, { Component } from "react"; -import { Button, Platform, StatusBar, StyleSheet, Text, View } from "react-native"; +import { + Button, + Platform, + StatusBar, + StyleSheet, + Text, + View +} from "react-native"; import { AppLoading, Asset, Font, Icon } from "expo"; import AppNavigator from "./navigation/AppNavigator"; import * as firebase from "firebase"; const firebaseConfig = { - apiKey: 'AIzaSyD_6-qVGk9CiFyhv6wmGp-PWb1b8-sCytc', - authDomain: 'gehl-921be.firebaseapp.com', - projectId: 'gehl-921be' + apiKey: "AIzaSyD_6-qVGk9CiFyhv6wmGp-PWb1b8-sCytc", + authDomain: "gehl-921be.firebaseapp.com", + projectId: "gehl-921be" }; firebase.initializeApp(firebaseConfig); @@ -23,10 +30,11 @@ export default class App extends React.Component { // https://github.com/hasura/react-native-auth-boilerplate/issues/11 _signIn = async () => { try { - console.log('start the log ing'); - const { type, idToken, user} = await Expo.Google.logInAsync({ - iosClientId: '8677857213-j9dn9ebe425td60q8c9tc20gomjbojip.apps.googleusercontent.com', - scopes: ['profile', 'email'] + console.log("start the log ing"); + const { type, idToken, user } = await Expo.Google.logInAsync({ + iosClientId: + "8677857213-j9dn9ebe425td60q8c9tc20gomjbojip.apps.googleusercontent.com", + scopes: ["profile", "email"] }); if (type === "success") { @@ -34,22 +42,23 @@ export default class App extends React.Component { userIsAuthenticated: true, name: user.name, photoUrl: user.photoUrl - }) + }); // Build Firebase credential with the access token. const credential = firebase.auth.GoogleAuthProvider.credential(idToken); - console.log(`credential: ${credential}`) + console.log(`credential: ${credential}`); // Sign in with credential from the Facebook user. - const firebaseSignInResult = await firebase.auth().signInAndRetrieveDataWithCredential(credential); + const firebaseSignInResult = await firebase + .auth() + .signInAndRetrieveDataWithCredential(credential); console.log(`sign in result: ${firebaseSignInResult}`); } else { - console.log("cancelled") + console.log("cancelled"); } - } catch (e) { - console.log("error", e) + console.log("error", e); } - } + }; render() { if (!this.state.isLoadingComplete && !this.props.skipLoadingScreen) { @@ -62,19 +71,21 @@ export default class App extends React.Component { ); } else { return ( - - {this.state.userIsAuthenticated ? ( - - {Platform.OS === "ios" && } - - - ) : (