├── .gitignore ├── App.js ├── app.json ├── assets ├── adaptive-icon.png ├── favicon.png ├── icon.png └── splash.png ├── babel.config.js ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 2 | 3 | # dependencies 4 | node_modules/ 5 | 6 | # Expo 7 | .expo/ 8 | dist/ 9 | web-build/ 10 | 11 | # Native 12 | *.orig.* 13 | *.jks 14 | *.p8 15 | *.p12 16 | *.key 17 | *.mobileprovision 18 | 19 | # Metro 20 | .metro-health-check* 21 | 22 | # debug 23 | npm-debug.* 24 | yarn-debug.* 25 | yarn-error.* 26 | 27 | # macOS 28 | .DS_Store 29 | *.pem 30 | 31 | # local env files 32 | .env*.local 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { View, Text, TextInput, Button, StyleSheet, ScrollView } from 'react-native'; 3 | import { initializeApp } from '@firebase/app'; 4 | import { getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword, onAuthStateChanged, signOut } from '@firebase/auth'; 5 | 6 | 7 | const firebaseConfig = { 8 | apiKey: "YOUR - apiKey", 9 | authDomain: "YOUR - authDomain", 10 | projectId: "YOUR - projectId", 11 | storageBucket: "YOUR - storageBucket", 12 | messagingSenderId: "YOUR - messagingSenderId", 13 | appId: "YOUR - appId", 14 | measurementId: "YOUR - measurementId" 15 | }; 16 | 17 | const app = initializeApp(firebaseConfig); 18 | 19 | const AuthScreen = ({ email, setEmail, password, setPassword, isLogin, setIsLogin, handleAuthentication }) => { 20 | return ( 21 | 22 | {isLogin ? 'Sign In' : 'Sign Up'} 23 | 24 | 31 | 38 | 39 |