Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-firebase-auth-android

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-firebase-auth-android

you can use firebase-auth in react-native

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

ReactNativeFirebaseAuthAndroid

firebase setup

goto firebase console. https://console.firebase.google.com add android in your project and follow the steps from there.

Install

npm install --save 'react-native-firebase-auth-android

rnpm link 'react-native-firebase-auth-android

If you use react-native 0.29

After rnpm link edit MainApplication.java file.

in MainApplication.java

import java.util.Arrays;
import java.util.List;

import rnfirebaseauth.ReactNativeFirebaseAuthAndroidPackage; // <- add this


.
.
.


protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
              new ReactNativeFirebaseAuthAndroidPackage() // <- add this
      );
    }

Usage

import FirebaseAuth from 'react-native-firebase-auth-android'

FirebaseAuth.createUserWithEmailAndPassword(email, pw, (user)=>{
      console.log(user)
    }, (err) => {
      console.log(err)
    })

FirebaseAuth.signInWithEmailAndPassword(email, pw, (user)=>{
      console.log(user)
    }, (err) => {
      console.log(err)
    })
FirebaseAuth.getCurrentUser((user)=>{
      console.log(user)
    }, (err) => {
      console.log(err)
    })
FirebaseAuth.sendPasswordResetEmail(email, (result)=>{
      console.log(result)
    }, (err) => {
      console.log(err)
    })
FirebaseAuth.googleLogin(googleIdToken, (user)=>{
      console.log(user)
    }, (err) => {
      console.log(err)
    })
FirebaseAuth.facebookLogin(facebookToken, (user)=>{
      console.log(user)
    }, (err) => {
      console.log(err)
    })            
user = {
  token: String
  email: String,
  uid: String, // not save this in local. 
  provider: String,
}
err = {
  errorCode: Int,
  errorMessage: String,
  allErrorMessage: String
}

Keywords

FAQs

Package last updated on 09 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc