Firebase Authentication in React Native:Google and Email Sign-In Tutorial #firebase#authenticaction

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome back to my Channel today  we're delving into Firebase authentication with   react native covering both Google and email  authentication methods but before we dive in   please hit that like button and subscribe  for more awesome content it really helps out as you can see I've already set up  the project with a slick sign up and   login UI and a homepage now let's  download the react native Firebase packages while those packages are installing  we'll handle some configuration navigate to   the Android folder then appsource main Java main  application file copy the project package name   make sure it's Unique as we'll use the same  package to create the app in Firebase now   open your Firebase console create a new project  and click on the Android icon paste the package   name in application package text field to enable  Google sign in we need a sha1 key navigate to the   Android folder in the terminal and run/ gradl  signing report to get the key copy the sha1 key   from the debug Android test variant and paste it  in Firebase register the app and follow the setup steps e now expand the build section at sidebar click on  authentication click on get started and click on   signin method Tab and click on ADD provider as  you can see I have already added Google and email   signin simple click on the provider that you want  to choose and enable it and then click on Save then click on realtime database in build  section click on create database select testing mode now click on the setting icon  next to project review and click   on Project settings download the Google  services. Json file and add it to the app folder don't forget to update the  Android /b build.gradle and   appb build.gradle files with  the necessary class path and plugin now let's start the react native app while it loads dive into the Firebase  documentation for social authentication   copy and paste the configuration code into  the login and sign up Pages importing the   necessary modules can get the web client ID from  Google service Json file check for client type 3 ID e implement the Google signup and login  handlers and ensure you've set up the   off State change function  to detect user signin status yes for signing out uncomment the home compon sign out   code and add the Google sign out  code using Google signin sign out function e Let's test the code click on the Google icon  you will see that Google sign in interface will   pop up choose an account now you are in home  screen click on sign out to sign out from the session now onto the signup page add the signup   code using off create user with email  and password and save the data in the database register with your  details and you're signed in e e for email login enter the registered  email and enter wrong password add   the email login code off sign in with  email and password in the login Pages   try and catch block you will get  an alert saying invalid email and password try WR password this time and you are signed in you can see users in the Firebase  authentication section and realtime database and that's it if you have any  questions or doubts feel free to ask in   the comments thanks for watching if you  found this tutorial helpful don't forget   to like share and subscribe stay tuned  for more exciting content happy coding
Info
Channel: CodeMender
Views: 960
Rating: undefined out of 5
Keywords:
Id: mbwx95J539k
Channel Id: undefined
Length: 13min 10sec (790 seconds)
Published: Thu Mar 14 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.