React native OTP verification using firebase | React native | Firebase

  Рет қаралды 35,748

JAS ACADAMY

JAS ACADAMY

Күн бұрын

Phone authentication allows users to sign in to Firebase using their phone as the authenticator. An SMS message is sent to the user via their phone number containing a unique code. Once the code has been authorized, the user is able to sign in to Firebase.
Phone numbers that end users provide for authentication will be sent and stored by Google to improve our spam and abuse prevention across Google services, including but not limited to Firebase. Developers should ensure they have appropriate end-user consent prior to using the Firebase Authentication phone number sign-in service.
rnfirebase.io/...
Command to generate SHA key
stackoverflow....
Ubuntu/Mac
- Open a terminal window
- Now run the following command
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Windows:
- Open a terminal window
- Change the directory to the JDK bin directory. The path of the JDK depends upon the operating system you are using
cd C:\Program Files\Java\jdk1.8.0_121\bin
- Now we have to run the following command using the keytool.exe file in JDK/bin
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
OTP invalid issue
github.com/inv...
/ firebase-sms-code-expi...
Android provides "auto verification" if Google Play service can automatically detect the incoming message (and doesn't display it!). If your test phone received otp sms, you can't use confirm function, it always return 'The SMS code has expired', please use verifyPhoneNumber function instead.
OnAuthStateChanged
In most scenarios using Authentication, you will want to know whether your users are currently signed-in or signed-out of your application. The module provides a method called onAuthStateChanged which allows you to subscribe to the users current authentication state, and receive an event whenever that state changes.
It is important to remember the onAuthStateChanged listener is asynchronous and will trigger an initial state once a connection with Firebase has been established
#reactnative #otp #firebase #android
#tags
react native firebase,react native tutorials,react native firebase phone authentication,react native,reactnative,react-native,react native phone authentication using firebase,phone authentication firebase,phone authentication firebase android,firebase ios,firebase,firebase auth,firebase login,firebase android,firebase phone auth,firebase phone authentication react native,firebase phone authentication,mobile application development,mobile application,react native firebase,react native firebase ios,react native firebase tutorial,react native firebase install,react native firebase android,react native firebase login,react native firebase auth tutorial,react-native-firebase,react native firebase authentication,react native firebase social app,react native firebase install ios,react native firebase ios integration,react native firebase ios installation,react native firebase email authentication,firebase otp,otp firebase,firebase phone auth,react and firebase,firebase authentication,phone auth firebase android,firebase otp authentication,firebase phone authentication,firebase mobile authentication,firebase otp verification android,phone authentication firebase,firebase sms authentication android,react otp,phone authentication firebase android,firebase phone authentication android,android otp,otp verification in android studio,firebase phone auth,firebase otp,firebase authentication,firebase otp authentication,firebase phone authentication,firebase mobile authentication,otp firebase,firebase sms authentication android,firebase phone authentication android,firebase otp verification android,react and firebase,phone auth firebase android,react otp,phone authentication firebase android,phone authentication firebase,phone authentication,otp verification in android studio,react native firebase authentication,react native firebase email authentication,react native firebase auth tutorial,react native firebase authentication tutorial,react native firebase auth,react native firebase tutorial,react native authentication,react native firebase login,react native firebase login tutorial,react native firebase social app,react native firebase,expo firebase authentication,firebase authentication,react authentication,react authorization,react authentication jwt,react authenticat,react authorization jwt,jwt authentication,reactjs tutorial,authentication,react authentication and authorization,react auth,jwt authentication react,react tutorial,react auth0,jwt authentication node js,authentication auth0,react js crash course,react security,authentication with jwt

Пікірлер: 41
@andreporto9758
@andreporto9758 Жыл бұрын
that "HI GUYS" at the beginning really woke me up lol
@usuarioanonimo577
@usuarioanonimo577 2 жыл бұрын
works in the real device, thanks bro
@JASACADAMY
@JASACADAMY 2 жыл бұрын
thanks for feedback 👍
@ivansamoiliuk5451
@ivansamoiliuk5451 10 ай бұрын
Hi! When I downloaded aab to the Google Play Console and used SHA-1 from the Google Play Console in the Firebase console, I don't go through the recapture, but immediately receive the code, but it comes expired. At the same time, the Firebase console shows that I am logged in. I don't understand how to organize the authentication logic for new users and existing ones. Please help.
@shubhamnikam1238
@shubhamnikam1238 8 ай бұрын
Does this need to be paid to send OTP to a mobile phone? My application is in React native and the backend is in Spring Boot which is on AWS. so for sign in I am just using Otp. so will it cost me to use firebase
@bansiparmar3879
@bansiparmar3879 Жыл бұрын
hello 2. Enable app verification can you guide me to complete this step in firebase auth config ..?
@ganeshzambare1693
@ganeshzambare1693 2 жыл бұрын
I have done setup using this video, but I am not getting message and code. Rather when I click on PhoneNumber sign In button, I am redirected to CAPCHA and need to select images. Any solution to get message instead of redirecting to CAPCHA verification. F.Y.I. am testing this feature on Emulator.
@JASACADAMY
@JASACADAMY 2 жыл бұрын
check in real device
@kousthubhyadavalli1077
@kousthubhyadavalli1077 4 ай бұрын
this is a very old video the authentication has changed now
@JASACADAMY
@JASACADAMY 4 ай бұрын
Will update now thanks for your comment
@william8751
@william8751 2 жыл бұрын
😂 the sigh as npm run android was loading had dying, that's how software development is like most of the time
@alexzil2142
@alexzil2142 2 жыл бұрын
Hello. I am trying this but it's not working. You don't show how you have android folder but that aside, I was able to install the android folder but when I use the code you used or the codes mentioned in the stackoverflow page, I get an error, CMD doesn't understand the code. It hasn't been registered or sth. What do I do??
@JASACADAMY
@JASACADAMY 2 жыл бұрын
Are using expo? expo project will not have android folder.I have created project using react-native cli
@trannhathao3827
@trannhathao3827 2 жыл бұрын
me too !! let's help me ple
@brrr2360
@brrr2360 Жыл бұрын
Im facing a problem... even when i try to login with my colleges phone number when the otp is received on his phone im getting auto verified and loggin in.. so, if the otp is received on the provided phone number is considering as verified but that number is not on my phone... plz help
@JASACADAMY
@JASACADAMY Жыл бұрын
have you verified it before?
@brrr2360
@brrr2360 Жыл бұрын
@@JASACADAMY im using SignInwithphonenumber method.. verifyphone is not registering the user in firebase.
@PercyMelody
@PercyMelody Жыл бұрын
Google auth login bro😢
@gibmemore2907
@gibmemore2907 Жыл бұрын
I have followed all steps but I am getting this error can you please help. This request is missing a valid app identifier, meaning that Play Integrity checks, and reCAPTCHA checks were unsuccessful. Please try again, or check the logcat for more details
@JASACADAMY
@JASACADAMY Жыл бұрын
Have you added identifier in settings
@furkansezeraric2966
@furkansezeraric2966 Жыл бұрын
Hi, I use this firebase packages, android is successfuly working but ios be crash after button click, I get this error to xcode __NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]" , I dont find solution , please help me !
@JASACADAMY
@JASACADAMY Жыл бұрын
have you added info.plist?
@furkansezeraric2966
@furkansezeraric2966 Жыл бұрын
@@JASACADAMY yes I did
@furkansezeraric2966
@furkansezeraric2966 Жыл бұрын
@@JASACADAMY I tried every road but I don’t found true solution , can u help me ?
Жыл бұрын
Furkan selam, ios'da çalıştırabilidin mi acaba ?
@furkansezeraric2966
@furkansezeraric2966 Жыл бұрын
@ evet çalıştırdım
@cyrilologho6969
@cyrilologho6969 2 жыл бұрын
What is the name of this vscode theme?
@JASACADAMY
@JASACADAMY 2 жыл бұрын
please check out vs code settings you can see theme
@nazim_kh4n
@nazim_kh4n 2 жыл бұрын
bhai this is proper working in Emulator but when used in real devices showing error auth/session-expired plz help also I'm enable Device check API
@JASACADAMY
@JASACADAMY 2 жыл бұрын
I am guessing you have not enabled the Device Check API. All you need to do is enable the Device Check API on the cloud platform firebase.google.com/docs/auth/android/phone-auth
@RohitPatil-un1uy
@RohitPatil-un1uy Жыл бұрын
@@JASACADAMY device check api is not available on google cloud console
@muhammadshahzaib9493
@muhammadshahzaib9493 2 жыл бұрын
why we have not used sha1 key??
@JASACADAMY
@JASACADAMY 2 жыл бұрын
both can use
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 124 МЛН
The FASTEST way to PASS SNACKS! #shorts #mingweirocks
00:36
mingweirocks
Рет қаралды 15 МЛН
React Native Authentication with Firebase and Expo in 27 minutes
27:49
Made With Matt
Рет қаралды 256 М.
React Native Login with JWT Auth Context
24:59
Simon Grimm
Рет қаралды 59 М.
Auto-Detect OTP in React Native (react-native-otp-verify)
13:38
Developers' Sin
Рет қаралды 39 М.
State Managers Are Making Your Code Worse In React
13:33
Web Dev Simplified
Рет қаралды 182 М.