- 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)})
- 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) })
- Add a github provider from firebase project, give client id & client secret from github developers settings
- 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
- 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) })
- Go to meta for developers (https://developers.facebook.com/) login and create an facebook app
- From the app dashboard's customize this app click on Customize adding a facebook login button
- Go to quick start & select web. Set the site url
- Go to settings. Set the valid OAuth redirects url's (Will take the url from the firebase project while setting the facebook provider)
- 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
- 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) })