Git Product home page Git Product logo

firebase-auth-recap's Introduction

Create user with email, pass

  • Call createUserWithEmailAndPassword()
  • And pass auth, email, and pass as parameter createUserWithEmailAndPassword(auth, email, pass)
  • After createUserWithEmailAndPassword() method call .then and .catch
  • Access the response from firebase inside .then(result => {console.log(result.user)})

Create user by google signIn

  • Call the GoogleAuthProvider:- const provider = new GoogleAuthProvider()
  • Import browser popup by using firebase signInWithPopUp method:- signInWithPopUp()
  • And pass the auth and provider inside the signInWithPopUp as parameter
  • Access the response from firebase inside .then(result => {console.log(result.user)}) and catch error .catch(error =>{ console.error(error) })

Create user by github signIn

Github app creation process

  1. Add a github provider from firebase project, give client id & client secret from github developers settings
  2. Create a new github app for the client id & client secret:- give a github app name, desc, homepage url, callback url from github provider that we are creating from our firebase project

Code example for implementing github sign in:

  • Call the GithubAuthProvider:- const provider = new GithubAuthProvider()
  • Import browser popup by using firebase signInWithPopUp method:- signInWithPopUp()
  • And pass the auth and provider inside the signInWithPopUp(auth, provider) as parameter
  • Access the response from firebase inside .then(result => {console.log(result.user)}) and catch error .catch(error =>{ console.error(error) })

Create user by Facebook signIn

Facebook for developers App creation process

  1. Go to meta for developers (https://developers.facebook.com/) login and create an facebook app
  2. From the app dashboard's customize this app click on Customize adding a facebook login button
  3. Go to quick start & select web. Set the site url
  4. Go to settings. Set the valid OAuth redirects url's (Will take the url from the firebase project while setting the facebook provider)
  5. Go to app use cases and from App settings go to the basic route and copy the app id, app secret and paste it on the fields while creating a facebook provider for your project at firebase

Code example for implementing facebook sign in:

  • Call the FacebookAuthProvider:- const provider = new FacebookAuthProvider()
  • Import browser popup by using firebase signInWithPopUp method:- signInWithPopUp()
  • And pass the auth and provider inside the signInWithPopUp(auth, provider) as parameter
  • Access the response from firebase inside .then(result => {console.log(result.user)}) and catch error .catch(error =>{ console.error(error) })

firebase-auth-recap's People

Contributors

mujahidul-islam11 avatar

Watchers

 avatar

Forkers

bryansumit

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.