Rohit Kalyania

Rohit Kalyania

1580420880

React Native Tutorial: Using Firebase Email Authentication or Login

A comprehensive step by step React Native tutorial on authentication or login using Firebase email authentication

In this React Native step by step tutorial, we will show you an example of using Firebase email authentication or log in with React Native iOS and Android apps. The environment is very simple, just React Native mobile apps as a client and Firebase email authentication as a server. We will use the latest React Hooks and React Native Firebase library to develop this login app.

This tutorial divided into several steps:

  • Step #1: Setup Google Firebase Email Authentication
  • Step #2: Create a New React Native Apps
  • Step #3: Install and Configure React Native Firebase
  • Step #4: Add React Navigation Header and Pages
  • Step #5: Implementing Firebase Email Login
  • Step #6: Implementing Firebase Email Register
  • Step #7: Implementing Firebase Email Reset Password
  • Step #8: Implementing a Secure Home Screen
  • Step #9: Run and Test React Native Firebase Email Login App

The scenario for this React Native Firebase Email tutorial is very simple. Just a login page/screen, register screen, reset password screen and home screen as a secure screen for the successful login landing page. The flow described in this diagram:

React Native Tutorial: Firebase Email Login Example - Flow Diagram

The following tools, frameworks, and libraries are required for this tutorial:

  1. Node.js (NPM or Yarn)
  2. React Native
  3. Google Firebase
  4. React Native Firebase library
  5. Android Studio or SDK for Android
  6. XCode for iOS
  7. Terminal (OSX/Linux) or Command Line (Windows)
  8. Text Editor or IDE (We are using Visual Studio Code)

Before start to the main steps, make sure that you have installed Node.js and can run npm in the terminal or command line. To check the existing or installed Node.js environment open the terminal/command line then type this command.

node -v
v8.12.0
npm -v
6.4.1
yarn -v
1.10.1

Step #1: Setup Google Firebase Email Authentication

We have to go to the Google Firebase Console https://console.firebase.google.com/ to set up the Firebase email authentication. After login using your Gmail account, it will be redirected to the Firebase welcome page.

React Native Tutorial: Firebase Email Login Example - Firebase Welcome

Click the “Create a Project” button then enter the project name (ours: “My React Native”).

React Native Tutorial: Firebase Email Login Example - Firebase New Project

Click the “Continue” button then disable the Google analytics for this project.

React Native Tutorial: Firebase Email Login Example - Firebase Google Analytics Enabled

Click the “Create Project” button then click the “Continue” button after the new Project is ready. Now, you will be redirected to the dashboard of the new project.

React Native Tutorial: Firebase Email Login Example - Firebase Project Dashboard

Next, choose to Develop -> Authentication on the left pane.

React Native Tutorial: Firebase Email Login Example - Firebase Authentication

Click on the “Sign-in Method” tab then click Email/Password.

React Native Tutorial: Firebase Email Login Example - Firebase Authentication Email Password

Click the “Enable” switch then click the “Save” button. Now, you will see the “Email/Password” enabled. Next, click the “Gear” button on the left pane then click Project Settings.

React Native Tutorial: Firebase Email Login Example - Firebase Settings

To set up iOS Apps, scroll down the Settings pane then click the iOS icon button.

React Native Tutorial: Firebase Email Login Example - Firebase iOS Bundle ID

Fill the iOS bundle ID that registered in your Apple Developer account then click the “Register App” button. Click “Download GoogleService-Info.plist” button to download the configuration file for iOS app then click the “Next” button few times until the end of the wizard step.

React Native Tutorial: Firebase Email Login Example - Firebase iOS End

Click the “Continue to console” button. To set up Android apps, scroll down then click the “Add app” button then click the “Android icon” button.

React Native Tutorial: Firebase Email Login Example - Firebase Android Package Name

Click the “Register App” button then click the “Download google-service.json” button to download the Android Firebase configuration file. Click the “Next” button few times until the end of the wizard steps.

React Native Tutorial: Firebase Email Login Example - Firebase Android End

Click the “Continue to console” button. Now, the Google Firebase email authentication is ready to use.

Step #2: Create a New React Native Apps

We will use React Native CLI to create a new React Native app. To install it, type this command in your App projects folder.

sudo npm install -g react-native-cli

Then create a React Native App using this command from your project directory.

react-native init RNEmailAuth

Next, go to the newly created React App folder and run the React Native app to the iOS simulator.

cd RNEmailAuth && npx react-native run-ios

Or run to the Android device/emulator.

cd RNEmailAuth && npx react-native run-android

When a new terminal window opened, go to the React Native project folder then run the Metro bundler server.

cd ~/Apps/RNEmailAuth && yarn start

Now, you will see this in the iOS simulator.

React Native Tutorial: Firebase Email Login Example - React Native Welcome Screen

Next, we will change the iOS and Android package name or bundle ID to match the Firebase configuration files. For iOS, open the ios/RNEmailAuth.xcworkspace file using XCode.

React Native Tutorial: Firebase Email Login Example - XCode Bundle Idenfitier

Just change the Bundle Identifier (ours: com.djamware.rnemailauth) and it ready to use with the Firebase Authentication Email/Password.

For Android a little tricky, first, change the source folders which previously android/app/src/main/java/com/rnemailauth become android/app/src/main/java/com/djamware/rnemailauth.

React Native Tutorial: Firebase Email Login Example - Android Package Structure

Next, open and edit android/app/src/main/java/com/djamware/rnemailauth/MainActivity.java and MainApplication.java then replace this package name.

package com.rnemailauth;

to

package com.djamware.rnemailauth;

Next, open and edit android/app/src/main/AndroidManifest.xml then change this line.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.rnemailauth">

To

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.djamware.rnemailauth">

Next, open edit android/app/build.gradle then change the application ID to the new package.

android {
  ...

  defaultConfig {
      applicationId "com.djamware.rnemailauth"
      minSdkVersion rootProject.ext.minSdkVersion
      targetSdkVersion rootProject.ext.targetSdkVersion
      versionCode 1
      versionName "1.0"
  }
  ...
}

Next, open and edit android/app/BUCK then change the android_build_config and android_resource package name.

android_build_config(
    name = "build_config",
    package = "com.djamware.rnemailauth",
)

android_resource(
    name = "res",
    package = "com.djamware.rnemailauth",
    res = "src/main/res",
)

Finally, run this command from the android folder to clean up the Gradle.

./gradlew clean

Step #3: Install and Configure React Native Firebase

To make integration easier, we use the RNFirebase Authentication module https://github.com/invertase/react-native-firebase/tree/master/packages/auth for accessing Firebase Authentication from the React Native apps. For that, type this command to install the module.

yarn add @react-native-firebase/app @react-native-firebase/auth

Setup React Native Firebase on iOS

To make this React Native Firebase Authentication working on iOS devices, make sure you have XCode Signing Development Team. Otherwise, you only can run this iOS app on the simulator.

Next, open the ios/RNEmailAuth.xcworkspace from the XCode then add the previously downloaded GoogleService-Info.plist to the XCode project name.

React Native Tutorial: Firebase Email Login Example - XCode Add GoogleService-Info.plist

After added to the XCode project will be like this.

React Native Tutorial: Firebase Email Login Example - XCode File Structure

Next, open and edit ios/Podfile then add this line of RNFBAuth.

target 'app' do
  ...
  pod 'RNFBAuth', :path => '../node_modules/@react-native-firebase/auth'
end

Next, run the Pod installation with repo-update after going to the ios folder.

cd ios && pod install --repo-update

Next, open and edit RNEmailAuth/AppDelegate.m then add these import of the Firebase.

#import <Firebase.h>

At the beginning of the **didFinishLaunchingWithOptions:(NSDictionary *)launchOptions** method add this line to initialize Firebase.

[FIRApp configure];

Setup React Native Firebase on Android

Copy the previously downloaded google-services.json to android/app/ folder.

cp ~/Downloads/google-services.json android/app/

Next, open and edit android/build.gradle then add this line inside the dependencies body.

dependencies {
    ...
    classpath("com.google.gms:google-services:4.2.0")
}

Next, open and edit android/app/build.gradle the add this line at the bottom of the file.

apply plugin: 'com.google.gms.google-services'

That it’s, all configuration was auto-linked when to add @react-native-firebase/app and @react-native-firebase/auth. If not auto-link, you can do a manual link like this.

react-native link @react-native-firebase/app
react-native link @react-native-firebase/auth

Step #4: Add React Navigation Header and Pages

Before implementing the Firebase Authentication email password login, we need to add pages for login, register, and home. For that, start your IDE to create those files. If you are using Visual Studio Code, type this command in the terminal at the root of this project folder.

code .

Create a folder for those files first then create files for login, register, and home.

mkdir components
touch components/Login.js
touch components/Register.js
touch components/Home.js
touch components/Reset.js

Open and edit components/Login.js then add these lines of React Hooks codes and disable Navigation header.

import React, { useState, useEffect } from 'react';
import { Button, View, Text } from 'react-native';

export default function Login({ navigation }) {

    return (
        <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
            <Text>Login</Text>
        </View>
    );
}

Login.navigationOptions = ({ navigation }) => ({
    title: 'Login',
    headerShown: false,
});

Open and edit components/Register.js then add these lines of React Hooks codes and disable Navigation header.

import React, { useState, useEffect } from 'react';
import { Button, View, Text } from 'react-native';

export default function Register({ navigation }) {

    return (
        <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
            <Text>Register</Text>
        </View>
    );
}

Register.navigationOptions = ({ navigation }) => ({
    title: 'Register',
    headerShown: false,
});

Open and edit components/Home.js then add these lines of React Hooks codes.

import React, { useState, useEffect } from 'react';
import { Button, View, Text } from 'react-native';

export default function Home({ navigation }) {

    return (
        <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
            <Text>Home</Text>
        </View>
    );
}

Home.navigationOptions = ({ navigation }) => ({
    title: 'Home',
});

Open and edit components/Reset.js then add these lines of React Hooks codes and disable Navigation header.

import React, { useState, useEffect } from 'react';
import { Button, View, Text } from 'react-native';

export default function Reset({ navigation }) {

    return (
        <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
            <Text>Reset</Text>
        </View>
    );
}

Reset.navigationOptions = ({ navigation }) => ({
    title: 'Reset',
    headerShown: false,
});

Next, we will add the Navigation header in the screen layout for this Mobile Apps. For that, add the libraries of React Navigation and React Native Gesture Handler by type these commands.

yarn add react-navigation react-navigation-stack react-native-safe-area-context @react-native-community/masked-view react-native-gesture-handler

For iOS, go to the ios folder then install Pod.

cd ios && pod install

Next, we will implement stack navigation in the current App.js. Open and edit App.js then add these imports of react-navigation createAppContainer, react-navigation-stack createStackNavigator, log in, Register, and Home.

import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import Login from './components/Login';
import Register from './components/Register';
import Home from './components/Home';
import Reset from './components/Reset';

Add a constant variable after the imports that initialize createStackNavigator.

const RootStack = createStackNavigator(
  {
    Login: Login,
    Register: Register,
    Home: Home,
    Reset: Reset,
  },
  {
    initialRouteName: 'Home',
    defaultNavigationOptions: {
      headerStyle: {
        backgroundColor: '#19AC52',
      },
      headerTintColor: '#fff',
      headerTitleStyle: {
        fontWeight: 'bold',
      },
    },
  },
);

Add the above createStackNavigator to the createAppContainer.

const RootContainer = createAppContainer(RootStack);

Replace the current main function and the export with this export function.

export default function App() {
  return (
    <RootContainer />
  )
}

Step #5: Implementing Firebase Email Login

The login screen will contain Email, Password Input Text, login, Register, and Reset Password Button. The action of the Login button will log in the entered email and password to Firebase authentication. Register and Reset button will redirect to Register and Reset screen.

We will use additional elements to build the login, register and reset forms. For that, type this command to install the react-native-elements and react-native-vector-icons modules.

yarn add react-native-elements react-native-vector-icons

To make the react-native-vector-icons working on iOS, open and edit ios/RNEmailAuth/Info.plist then add these lines of UIAppFonts before the end of .

<dict>
    ...
    <key>UIAppFonts</key>
    <array>
        <string>AntDesign.ttf</string>
        <string>Entypo.ttf</string>
        <string>EvilIcons.ttf</string>
        <string>Feather.ttf</string>
        <string>FontAwesome.ttf</string>
        <string>FontAwesome5_Brands.ttf</string>
        <string>FontAwesome5_Regular.ttf</string>
        <string>FontAwesome5_Solid.ttf</string>
        <string>Foundation.ttf</string>
        <string>Ionicons.ttf</string>
        <string>MaterialIcons.ttf</string>
        <string>MaterialCommunityIcons.ttf</string>
        <string>SimpleLineIcons.ttf</string>
        <string>Octicons.ttf</string>
        <string>Zocial.ttf</string>
    </array>
</dict>

Next, open and edit components/Login.js then add/replace these imports of the required elements and Firebase auth.

import React, { useState } from 'react';
import { StyleSheet, ActivityIndicator, View, Text, Alert } from 'react-native';
import { Button, Input, Icon } from 'react-native-elements';
import auth from '@react-native-firebase/auth';

Add the required useState constant variable at the first line of the Login function body.

const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [showLoading, setShowLoading] = useState(false);

Add a function of Firebase login with email and password after those constants.

const login = async() => {
    setShowLoading(true);
    try {
        const doLogin = await auth().signInWithEmailAndPassword(email, password);
        setShowLoading(false);
        if(doLogin.user) {
            navigation.navigate('Home');
        }
    } catch (e) {
        setShowLoading(false);
        Alert.alert(
            e.message
        );
    }
};

Modify these views after the login function to implementing the Login Form UI.

return (
    <View style={styles.container}>
        <View style={styles.formContainer}>
            <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center'}}>
                <Text style={{ fontSize: 28, height: 50  }}>Please Login!</Text>
            </View>
            <View style={styles.subContainer}>
                <Input
                    style={styles.textInput}
                    placeholder='Your Email'
                    leftIcon={
                        <Icon
                        name='mail'
                        size={24}
                        />
                    }
                    value={email}
                    onChangeText={setEmail}
                />
            </View>
            <View style={styles.subContainer}>
                <Input
                    style={styles.textInput}
                    placeholder='Your Password'
                    leftIcon={
                        <Icon
                        name='lock'
                        size={24}
                        />
                    }
                    secureTextEntry={true}
                    value={password}
                    onChangeText={setPassword}
                />
            </View>
            <View style={styles.subContainer}>
                <Button
                    style={styles.textInput}
                    icon={
                        <Icon
                            name="input"
                            size={15}
                            color="white"
                        />
                    }
                    title="Login"
                    onPress={() => login()} />
            </View>
            <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
                <Text>Forgot Password?</Text>
            </View>
            <View style={styles.subContainer}>
                <Button
                    style={styles.textInput}
                    icon={
                        <Icon
                            name="refresh"
                            size={15}
                            color="white"
                        />
                    }
                    title="Reset Password"
                    onPress={() => {
                        navigation.navigate('Reset');
                    }} />
            </View>
            <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
                <Text>Not a user?</Text>
            </View>
            <View style={styles.subContainer}>
                <Button
                    style={styles.textInput}
                    icon={
                        <Icon
                            name="check-circle"
                            size={15}
                            color="white"
                        />
                    }
                    title="Register"
                    onPress={() => {
                        navigation.navigate('Register');
                    }} />
            </View>
            {showLoading &&
                <View style={styles.activity}>
                    <ActivityIndicator size="large" color="#0000ff" />
                </View>
            }
        </View>
    </View>
);

Finally, add these lines of styles after the navigationOptions.

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    },
    formContainer: {
        height: 400,
        padding: 20
    },
    subContainer: {
        marginBottom: 20,
        padding: 5,
    },
    activity: {
        position: 'absolute',
        left: 0,
        right: 0,
        top: 0,
        bottom: 0,
        alignItems: 'center',
        justifyContent: 'center'
    },
    textInput: {
        fontSize: 18,
        margin: 5,
        width: 200
    },
})

Step #6: Implementing Firebase Email Register

The Firebase authentication email password register or sign-in almost the same with the previous Login. The difference just a Firebase method, this time using createUserWithEmailAndPassword. Open and edit components/Register.js then add these imports to the required elements and Firebase auth.

import React, { useState } from 'react';
import { StyleSheet, ActivityIndicator, View, Text, Alert } from 'react-native';
import { Button, Input, Icon } from 'react-native-elements';
import auth from '@react-native-firebase/auth';

Add these useState constant variables at the first line of the Register function body.

const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [showLoading, setShowLoading] = useState(false);

Add the asynchronous function to register to the Firebase auth with email and password.

const register = async() => {
    setShowLoading(true);
    try {
        const doRegister = await auth().createUserWithEmailAndPassword(email, password);
        setShowLoading(false);
        if(doRegister.user) {
            navigation.navigate('Home');
        }
    } catch (e) {
        setShowLoading(false);
        Alert.alert(
            e.message
        );
    }
};

Modify the views that implement the Register Form using a combination of react-native and react-native-elements elements.

return (
    <View style={styles.container}>
        <View style={styles.formContainer}>
            <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
                <Text style={{ fontSize: 28, height: 50 }}>Register Here!</Text>
            </View>
            <View style={styles.subContainer}>
                <Input
                    style={styles.textInput}
                    placeholder='Your Email'
                    leftIcon={
                        <Icon
                        name='mail'
                        size={24}
                        />
                    }
                    value={email}
                    onChangeText={setEmail}
                />
            </View>
            <View style={styles.subContainer}>
                <Input
                    style={styles.textInput}
                    placeholder='Your Password'
                    leftIcon={
                        <Icon
                        name='lock'
                        size={24}
                        />
                    }
                    secureTextEntry={true}
                    value={password}
                    onChangeText={setPassword}
                />
            </View>
            <View style={styles.subContainer}>
                <Button
                    style={styles.textInput}
                    icon={
                        <Icon
                            name="check-circle"
                            size={15}
                            color="white"
                        />
                    }
                    title="Register"
                    onPress={() => register()} />
            </View>
            <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
                <Text>Already a user?</Text>
            </View>
            <View style={styles.subContainer}>
                <Button
                    style={styles.textInput}
                    icon={
                        <Icon
                            name="input"
                            size={15}
                            color="white"
                        />
                    }
                    title="Login"
                    onPress={() => {
                        navigation.navigate('Login');
                    }} />
            </View>
            {showLoading &&
                <View style={styles.activity}>
                    <ActivityIndicator size="large" color="#0000ff" />
                </View>
            }
        </View>
    </View>
);

Finally, add these codes of styles after the navigationOptions.

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    },
    formContainer: {
        height: 400,
        padding: 20
    },
    subContainer: {
        marginBottom: 20,
        padding: 5,
    },
    activity: {
        position: 'absolute',
        left: 0,
        right: 0,
        top: 0,
        bottom: 0,
        alignItems: 'center',
        justifyContent: 'center'
    },
    textInput: {
        fontSize: 18,
        margin: 5,
        width: 200
    },
})

Step #7: Implementing Firebase Email Reset Password

The reset password screen just required one email input text and reset button. Also, a button to navigate back the previous screen. Open and edit components/Reset.js then add/replace these imports of the required elements and Firebase auth.

import React, { useState } from 'react';
import { StyleSheet, ActivityIndicator, View, Text, Alert } from 'react-native';
import { Button, Input, Icon } from 'react-native-elements';
import auth from '@react-native-firebase/auth';

Add these required useState constant variables at the first line of the Reset function body.

const [email, setEmail] = useState('');
const [showLoading, setShowLoading] = useState(false);

Add this function to send an email for a reset password to Firebase authentication. The Firebase will send the reset link email to the email that sends in this function.

const reset = async() => {
    setShowLoading(true);
    try {
        await auth().sendPasswordResetEmail(email);
        setShowLoading(false);
    } catch (e) {
        setShowLoading(false);
        Alert.alert(
            e.message
        );
    }
};

Add this implementation of view for Reset password form by modifying the existing return.

return (
    <View style={styles.container}>
        <View style={styles.formContainer}>
            <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center'}}>
                <Text style={{ fontSize: 28, height: 50  }}>Reset Password!</Text>
            </View>
            <View style={styles.subContainer}>
                <Input
                    style={styles.textInput}
                    placeholder='Your Email'
                    leftIcon={
                        <Icon
                        name='mail'
                        size={24}
                        />
                    }
                    value={email}
                    onChangeText={setEmail}
                />
            </View>
            <View style={styles.subContainer}>
                <Button
                    style={styles.textInput}
                    icon={
                        <Icon
                            name="input"
                            size={15}
                            color="white"
                        />
                    }
                    title="Reset"
                    onPress={() => reset()} />
            </View>
            <View style={styles.subContainer}>
                <Button
                    style={styles.textInput}
                    icon={
                        <Icon
                            name="check-circle"
                            size={15}
                            color="white"
                        />
                    }
                    title="Back to Login"
                    onPress={() => {
                        navigation.navigate('Login');
                    }} />
            </View>
            {showLoading &&
                <View style={styles.activity}>
                    <ActivityIndicator size="large" color="#0000ff" />
                </View>
            }
        </View>
    </View>
);

Finally, add these styles for this Reset Form after the navigationOptions.

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
    },
    formContainer: {
        height: 400,
        padding: 20
    },
    subContainer: {
        marginBottom: 20,
        padding: 5,
    },
    activity: {
        position: 'absolute',
        left: 0,
        right: 0,
        top: 0,
        bottom: 0,
        alignItems: 'center',
        justifyContent: 'center'
    },
    textInput: {
        fontSize: 18,
        margin: 5,
        width: 200
    },
})

Step #8: Implementing a Secure Home Screen

The Home screen is the initial screen that comes first when this React Native app started. So, there will be a function to check the authenticated user. If it exists then this screen will display the user email. If not exists, it will be redirected to the Login screen. Open and edit components/Home.js then add/replace these imports of required elements and Firebase auth.

import React, { useState, useEffect } from 'react';
import { View, Text } from 'react-native';
import { Button, Icon } from 'react-native-elements';
import auth from '@react-native-firebase/auth';

Add these required useState constant variables inside the first line of the Home function body.

const [initializing, setInitializing] = useState(true);
const [user, setUser] = useState();

Add a function that sets the user value if the user authenticated.

function onAuthStateChanged(user) {
    setUser(user);
    if (initializing) setInitializing(false);
}

Add the useEffect function check the authenticated user every time the screen loaded.

useEffect(() => {
    const subscriber = auth().onAuthStateChanged(onAuthStateChanged);
    return subscriber; // unsubscribe on unmount
}, []);

Add a condition that returns null user if initializing is true.

if (initializing) return null;

Add a condition that redirects to the Login page if there’s no user exists or loaded.

if (!user) {
    return navigation.navigate('Login');
}

Modify the view to implementing the user email on this screen.

return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
        <Text>Welcome {user.email}</Text>
    </View>
);

Finally, modify the navigationOptions to add the logout button that fires the logout method of Firebase auth.

Home.navigationOptions = ({ navigation }) => ({
    title: 'Home',
    headerRight: () => <Button
            buttonStyle={{ padding: 0, marginRight: 20, backgroundColor: 'transparent' }}
            icon={
                <Icon
                    name="cancel"
                    size={28}
                    color="white"
                />
            }
            onPress={() => {auth().signOut()}} />,
});

Step #9: Run and Test React Native Firebase Email Login App

This time to run and test the React Native Firebase Email login app in the iOS simulator and Android device. To run this app to the iOS device, you need an XCode Signing Development Team. For iOS, type this command.

react-native run-ios

When the new terminal windows open, type this command immediately.

cd ~/Apps/RNEmailAuth && yarn start

To run in an Android device, make sure the Android phone connected to the computer and available by this command.

adb devices

Next, run to the android device by type this command.

react-native run-android

When the new terminal windows open, type this command immediately.

cd ~/Apps/RNEmailAuth && yarn start

And here they are the fully working React Native Firebase Authentication Email/Password.

React Native Tutorial: Firebase Email Login Example - iOS Demo

You also can check the registered email in the Firebase console like this.

React Native Tutorial: Firebase Email Login Example - Firebase User List

And the received password reset email link should be similar to this.

React Native Tutorial: Firebase Email Login Example - Reset Password Email

That it’s, the React Native Tutorial: Firebase Email Login Example. You can get the full source code in our GitHub.

Thanks!

#react-native #react #ios #react-js

What is GEEK

Buddha Community

React Native Tutorial: Using Firebase Email Authentication or Login
Autumn  Blick

Autumn Blick

1598839687

How native is React Native? | React Native vs Native App Development

If you are undertaking a mobile app development for your start-up or enterprise, you are likely wondering whether to use React Native. As a popular development framework, React Native helps you to develop near-native mobile apps. However, you are probably also wondering how close you can get to a native app by using React Native. How native is React Native?

In the article, we discuss the similarities between native mobile development and development using React Native. We also touch upon where they differ and how to bridge the gaps. Read on.

A brief introduction to React Native

Let’s briefly set the context first. We will briefly touch upon what React Native is and how it differs from earlier hybrid frameworks.

React Native is a popular JavaScript framework that Facebook has created. You can use this open-source framework to code natively rendering Android and iOS mobile apps. You can use it to develop web apps too.

Facebook has developed React Native based on React, its JavaScript library. The first release of React Native came in March 2015. At the time of writing this article, the latest stable release of React Native is 0.62.0, and it was released in March 2020.

Although relatively new, React Native has acquired a high degree of popularity. The “Stack Overflow Developer Survey 2019” report identifies it as the 8th most loved framework. Facebook, Walmart, and Bloomberg are some of the top companies that use React Native.

The popularity of React Native comes from its advantages. Some of its advantages are as follows:

  • Performance: It delivers optimal performance.
  • Cross-platform development: You can develop both Android and iOS apps with it. The reuse of code expedites development and reduces costs.
  • UI design: React Native enables you to design simple and responsive UI for your mobile app.
  • 3rd party plugins: This framework supports 3rd party plugins.
  • Developer community: A vibrant community of developers support React Native.

Why React Native is fundamentally different from earlier hybrid frameworks

Are you wondering whether React Native is just another of those hybrid frameworks like Ionic or Cordova? It’s not! React Native is fundamentally different from these earlier hybrid frameworks.

React Native is very close to native. Consider the following aspects as described on the React Native website:

  • Access to many native platforms features: The primitives of React Native render to native platform UI. This means that your React Native app will use many native platform APIs as native apps would do.
  • Near-native user experience: React Native provides several native components, and these are platform agnostic.
  • The ease of accessing native APIs: React Native uses a declarative UI paradigm. This enables React Native to interact easily with native platform APIs since React Native wraps existing native code.

Due to these factors, React Native offers many more advantages compared to those earlier hybrid frameworks. We now review them.

#android app #frontend #ios app #mobile app development #benefits of react native #is react native good for mobile app development #native vs #pros and cons of react native #react mobile development #react native development #react native experience #react native framework #react native ios vs android #react native pros and cons #react native vs android #react native vs native #react native vs native performance #react vs native #why react native #why use react native

Hire Dedicated React Native Developer

Have you ever thought of having your own app that runs smoothly over multiple platforms?

React Native is an open-source cross-platform mobile application framework which is a great option to create mobile apps for both Android and iOS. Hire Dedicated React Native Developer from top React Native development company, HourlyDeveloper.io to design a spectacular React Native application for your business.

Consult with experts:- https://bit.ly/2A8L4vz

#hire dedicated react native developer #react native development company #react native development services #react native development #react native developer #react native

Juned Ghanchi

1621573085

React Native App Developers India, React Native App Development Company

Expand your user base by using react-native apps developed by our expert team for various platforms like Android, Android TV, iOS, macOS, tvOS, the Web, Windows, and UWP.

We help businesses to scale up the process and achieve greater performance by providing the best react native app development services. Our skilled and experienced team’s apps have delivered all the expected results for our clients across the world.

To achieve growth for your business, hire react native app developers in India. You can count on us for all the technical services and support.

#react native app development company india #react native app developers india #hire react native developers india #react native app development company #react native app developers #hire react native developers

Hire Dedicated React Native Developers - WebClues Infotech

Being one of the emerging frameworks for app development the need to develop react native apps has increased over the years.

Looking for a react native developer?

Worry not! WebClues infotech offers services to Hire React Native Developers for your app development needs. We at WebClues Infotech offer a wide range of Web & Mobile App Development services based o your business or Startup requirement for Android and iOS apps.

WebClues Infotech also has a flexible method of cost calculation for hiring react native developers such as Hourly, Weekly, or Project Basis.

Want to get your app idea into reality with a react native framework?

Get in touch with us.

Hire React Native Developer Now: https://www.webcluesinfotech.com/hire-react-native-app-developer/

For inquiry: https://www.webcluesinfotech.com/contact-us/

Email: sales@webcluesinfotech.com

#hire react native developers #hire dedicated react native developers #hire react native developer #hiring a react native developer #hire freelance react native developers #hire react native developers in 1 hour

Factors affecting the cost of hiring a React Native developer in USA - TopDevelopers.co

Want to develop app using React Native? Here are the tips that will help to reduce the cost of react native app development for you.
Cost is a major factor in helping entrepreneurs take decisions about investing in developing an app and the decision to hire react native app developers in USA can prove to be fruitful in the long run. Using react native for app development ensures a wide range of benefits to your business. Understanding your business and working on the aspects to strengthen business processes through a cost-efficient mobile app will be the key to success.

#best react native development companies from the us #top react native app development companies in usa #cost of hiring a react native developer in usa #top-notch react native developer in usa #best react native developers usa #react native