Git Product home page Git Product logo

reactnativelogin's Introduction

ReactNativeLogin

React Native İçin Gerekli Araçlar

NodeJS
Java JDK
Android Studio
VS Code / Atom / WebStorm vs ..

Daha sonra React Native Cli yüklenmeli.
npm install -g react-native-cli

Proje oluşturmak için;
react-native init PrpjeName

React Native projeyi çalıştırmak için;
react-native run-app

React Native Firebase Login

Proje oluşturduktan sonra Android platformuna Firebase eklenmeli.
React Native uygulamasına react-native-firebase kütüphanesi yüklenmeli.

npm install --save react-native-firebase
react-native link react-native-firebase

Android uygulamanızın proje build.gradle dosyasına gidip alttaki satırları dependencies alanına eklenmeli.
classpath 'com.google.gms:google-services:4.2.0'

App klasörünün altındaki build.gradle dosyasını açıp dosyanın en altına alttaki satır eklenmeli.

implementation "com.google.firebase:firebase-core:16.0.9"
implementation'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.firebaseui:firebase-ui-auth:4.2.0'

Firebase Register

  firebase.auth().createUserWithEmailAndPassword(this.state.typeEmail, this.state.typePassword)
  .then(() => {
    this.setState({user: loggedInUSer});
    alert('Register successfuly');
    console.log('Register with user: ${JSON.stringfy(loggedInUSer.toJSON())}');
  
  }).catch((error) => {
    console.log('Register fail with error: $(error)');
  });
}

Firebase Login

  firebase.auth().signInWithEmailAndPassword(this.state.typeEmail, this.state.typePassword)
  .then((loggedInUser) => {
    alert('Giriş Başarılı. ');
    console.log('Login with user: ${JSON.stringfy(loggedInUser.toJSON())}');    

  }).catch((error) => {
    alert('Email veya Şifre yanlış. ');
    console.log('Login fail with error ${error}');
  });
}

reactnativelogin's People

Contributors

esmacolak avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.