Android Firebase Send a User a Verification Email (Explained)

  Рет қаралды 52,707

Coding Demos

Coding Demos

Күн бұрын

In this Android firebase tutorial, you will learn how to send a verification email to the user when registering for an account using firebase authentication library.
This tutorial is a continuation of the previous part where we covered how to reset the user's password in firebase, so make sure to watch that part first.
In this tutorial you will modify the code for user registration in MainActivity.java to include the code for Firebase email verification.
Once the user fill in the email and password inside the registration form, Firebase will send a verification email to the user's email address so that the user can verify his account.
The app can prevent the user from login if this user didn't successfully verify the email address that was registered with the app.
- You will learn:
1- How to send a user a verification email using firebase authentication library.
2- How to customize the registration flow so that the user is required to verify the email address first, failing to do so will prevent the user from login to the app.
- Links:
1- Firebase: firebase.google.com/
2- More Android tutorials: www.codingdemos.com/

Пікірлер: 114
@josesavioli3982
@josesavioli3982 3 жыл бұрын
Very complete! Gotta say the 4 video series about user registering and basic login verifications and interactions are one of the best of these materials for begginers on KZfaq
@gaminggenes320
@gaminggenes320 4 жыл бұрын
Very clear explanation! Now I can understand the actual flow of it and know where to write which piece of code, thanks a lot! :D
@jackbrabham
@jackbrabham 4 жыл бұрын
Love your videos! They are extremely easy to follow and very helpful. Thanks a lot!
@umirazagems1527
@umirazagems1527 3 жыл бұрын
such a relief, I was struggling to do this in my app. You explained very well *sir* ... *Thank you very much.* ..
@alperenunuvar
@alperenunuvar 4 жыл бұрын
Thanks for excellent course!
@kieyronvidal2688
@kieyronvidal2688 5 жыл бұрын
Thank youuuuu for your clear explanation. It really helped me!
@dornakc6744
@dornakc6744 5 жыл бұрын
Simple but helpful. Nice video
@amirul7411
@amirul7411 3 жыл бұрын
The way you explained this is so simple indeed I understood each of your explanation. The way you show your code was clear and easy to follow. Thank You Sir!
@CodingDemos
@CodingDemos 3 жыл бұрын
Thank you. I'm glad to hear that 😃
@bsa9863
@bsa9863 5 жыл бұрын
Thanks alot, great explanation.
@arfakhan2589
@arfakhan2589 4 жыл бұрын
helped me a lot sir! thnku so much for this video.
@napolehong92
@napolehong92 5 жыл бұрын
fianlly, i find it and the did this code is your git code, Actuallty such as me, like a beginer have to spend the time to solve this project problem. anyway thank you of your effort, i did save the time, thanks a lot bro~~!!
@OrlyElazar
@OrlyElazar 2 жыл бұрын
Loved it. Greate tutorial !
@joabsantos2866
@joabsantos2866 5 жыл бұрын
very clear explanation
@adiraiferoz
@adiraiferoz 5 жыл бұрын
I always click the like button before watching your videos..
@CodingDemos
@CodingDemos 5 жыл бұрын
Thank you for the support :)
@murathansuer3523
@murathansuer3523 3 жыл бұрын
I really have been endeavoring how I return to login panel again after I complete sign up process. As soon as I clicked register button, my activity automatically was going to determinated new Intent Activity. It was really insane problem. Your && e-mail verification code fixed my problem successfully. Thank you sooo much.
@CodingDemos
@CodingDemos 3 жыл бұрын
I'm glad that I could help 😃
@jclg123
@jclg123 5 жыл бұрын
It works for me, thank you very much, great job!.
@anb4351
@anb4351 3 жыл бұрын
Thanks finally Client added this requirement at the end and I had no Idea how to do this this video is outdated but neverthless it helped
@CodingDemos
@CodingDemos 3 жыл бұрын
Great 😃
@RODRIIGUESFS
@RODRIIGUESFS 5 жыл бұрын
Great man, helps me a lot! Like!
@isurubandara899
@isurubandara899 4 жыл бұрын
great dude, I learned a lot of things about Auth. If you can make videos about Firestore, like how to store Data such as Texts, Images, and Videos, it might help other developers also. because many of them use REAL-TIME DATABASE of firebase, no one use FIRESTORE. Thank you!
@actyon20
@actyon20 4 жыл бұрын
Thank you very very much.
@felicity4347
@felicity4347 4 жыл бұрын
Video very helpful, thank you
@imtiazuddinriad6138
@imtiazuddinriad6138 5 жыл бұрын
Thank you brother
@UtkuAydn99
@UtkuAydn99 4 жыл бұрын
Thanks a lot man
@hamzabilal9129
@hamzabilal9129 5 жыл бұрын
Nice Explanation. But one thing I like to suggest is that you can refresh your console by clicking refreshing arrow on the side of "Add User" without refreshing the whole page which take more time.
@CodingDemos
@CodingDemos 5 жыл бұрын
Hi, thank you for the suggestion :)
@hashimabdikadir7590
@hashimabdikadir7590 2 жыл бұрын
you saved my time brother..... Big Fat Thanks
@CodingDemos
@CodingDemos 2 жыл бұрын
You're welcome 😃
@shiwamjaiswal9653
@shiwamjaiswal9653 5 жыл бұрын
just got what i wanted , thanks
@esraasalah8900
@esraasalah8900 5 жыл бұрын
Thank you
@simpleman1534
@simpleman1534 3 жыл бұрын
Thanks For Helping Brother .easy and simple explanation
@CodingDemos
@CodingDemos 3 жыл бұрын
You're welcome 😃
@JayeshBabuAV
@JayeshBabuAV 5 жыл бұрын
thank u very much for this tutorial. I have a small doubt in your code. U are checking if the user is verified after logging in. Is there any way to check whether the email is verified before logging in? I mean, I want the user to login only if the email is verified. Is there any way to do it? Thanks anyway..
@huzaifaameen99
@huzaifaameen99 5 жыл бұрын
Hello, your video help me alot, can we redirect user to app once email verified after clicking on email link?
@salmaxxiii5033
@salmaxxiii5033 3 жыл бұрын
thank you for the nice explanation ♥
@CodingDemos
@CodingDemos 3 жыл бұрын
You're welcome 😀
@alpazinou7501
@alpazinou7501 3 жыл бұрын
really helpful thank you
@CodingDemos
@CodingDemos 3 жыл бұрын
You're welcome 😃
@nazmusshakib6125
@nazmusshakib6125 4 жыл бұрын
Thnx man
@pavansai6847
@pavansai6847 5 жыл бұрын
At 5:42 I am not getting sendEmailVerification() suggestion help??
@ibrahimeryilmaz6221
@ibrahimeryilmaz6221 3 жыл бұрын
thank you
@najihahnasir4462
@najihahnasir4462 5 жыл бұрын
Hi. I managed to do the verification email, thanks a lot. But why do i still manage to login even though i have not click the link(in verification email) ? It supposed to be like right after you click the link then only you able to login, am i right?
@shakesgar
@shakesgar 4 жыл бұрын
Hi, thanks for your videos. They have been a great help in completing a recent project. Do you realize that the auth link sent to your email contains your API key? What can we do about this?
@whatnot798
@whatnot798 4 жыл бұрын
You can customize the email and URL support.google.com/firebase/answer/7000714
@tahirdevlog2047
@tahirdevlog2047 3 жыл бұрын
amazing thanks
@CuongPham-hu5mk
@CuongPham-hu5mk 2 жыл бұрын
thanks you so much ! love from Viet Nam
@cdelacruzg
@cdelacruzg 2 жыл бұрын
thanks
@shikharsingh1906
@shikharsingh1906 3 жыл бұрын
Sir where I can find home activity my 1st activity is MainActivity, second activity is RegisterActivity, third activity is Login Activity in which activity I should use the code which you used is lase Home.class activity Please help
@ScoobyRv
@ScoobyRv 5 жыл бұрын
thank you great explanation
@ScoobyRv
@ScoobyRv 5 жыл бұрын
Can i ask something it is possible to disable an account if it exceed to enter the rigth password?
@CodingDemos
@CodingDemos 5 жыл бұрын
Hi, I'm not really sure about that
@sumanthachark
@sumanthachark 4 жыл бұрын
This is a continuation of some vid or from the start?
@abu-bakrpereirakebe508
@abu-bakrpereirakebe508 5 жыл бұрын
great
@carlosrodrigovogt6748
@carlosrodrigovogt6748 3 жыл бұрын
Hello! Thanks for your video. But I have a question, how did your app stey logged? My app loggof every time. Thanks
@iqindian5009
@iqindian5009 3 жыл бұрын
There is code available for checking if user still logged on and if yes then continue. Find it on firebase documentation pages
@senkail6625
@senkail6625 Жыл бұрын
Is it possible for me not to register the user email in the database before verifying it??? I need this to avoid using the limits user (50k auth) on free plan
@snehilrsingh7347
@snehilrsingh7347 4 жыл бұрын
Hii.. I m following ur tutorial as I m a beginner. I am done with firebase authentication. Now, I ve added firebase database to my project.. in which i m trying to store user data to the database after user verifies his/her email bt i m not able to code. can u plzz help? I m able to store data to database before email verification i.e when user successfully register for the first time.. any help?? ITS URGENT
@_Kanad_Patil_TE_IT
@_Kanad_Patil_TE_IT 4 жыл бұрын
awesome! it really really helped me sir! please make video on firebase phone authentication.
@CodingDemos
@CodingDemos 4 жыл бұрын
Hi, I'm happy to hear that :) I made a tutorial about Firebase phone auth: www.codingdemos.com/android-firebase-ui-how-to-use-firebase-phone-auth/
@malekguettiche5677
@malekguettiche5677 3 жыл бұрын
Hi, first of all, thanks for your videosI'm clicking on the verification links immediately after getting the verification mail, but still the answer is only:Try verifying your email again Your request to verify your email has expired or the link has already been usedAnyone have an idea what could be the issue?
@jaisuriyar5259
@jaisuriyar5259 4 жыл бұрын
But how to programmatically delete the unverified email address stored in the Firebase if someone not verifying it completely.???
@CodingDemos
@CodingDemos 3 жыл бұрын
Programmatically, you can only remove accounts from Firebase if they have previously login to your app. The other way to delete any accounts will be done through the Firebase console.
@kir4n
@kir4n 3 жыл бұрын
exactly! i came across a problem where if you do not verify your email, the mail is still registered in firebase after you click sign up. so if i click sign up and then don't verify my email address but still again go to the sign up screen and try to sign up with the same email then it says the email is already in use even tho i never really verified that email address so either i am doing something wrong or yeah this is a problem. did you find a fix? Thank you
@jaisuriyar5259
@jaisuriyar5259 3 жыл бұрын
@@kir4n I'm still not able to find a solution for that... So I moved to phone number registration.
@pratikdhoriyani5160
@pratikdhoriyani5160 4 жыл бұрын
Hello sir... I have a small problem... As learned from your beautiful video I have added the VERIFICATION PART in my project... So every user need to verify their email before login... But I want to add some user manually in Firebase ...and I did that also into my project and I successfully added that... BUT main problems is that when I try to LOGIN using that email I am having error message like "Please verify your email...".... But as I told you earlier I added user manually in Firebase so I didn't receive any verification email into that perticular account..... So is there any way to login using manually added users into my app... Please if it is available and if you have solution then please let me know because I need to complete my project as early as possible... THANK YOU IN ADVANCE 😊😊😊...
@CodingDemos
@CodingDemos 4 жыл бұрын
Hi, adding a user from the Firebase console is still considered not yet verified unless you do it through the app. I've also checked the Firebase console to see if there is an option to send email verification, but sadly they don't have it. I'm sorry, but I don't have a solution/way to solve this.
@pratikdhoriyani5160
@pratikdhoriyani5160 4 жыл бұрын
@@CodingDemos Thank You very much sir for your overwhelming SUPPORT... I also found exactly like your answer... So there is no solutions I think... So if sir is there any way then please first let me know... Again THANK YOU 😊😊
@CodingDemos
@CodingDemos 4 жыл бұрын
@@pratikdhoriyani5160 You're welcome :)
@aicramiermummuh6434
@aicramiermummuh6434 4 жыл бұрын
" java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.tasks.Task com.google.firebase.auth.FirebaseUser.sendEmailVerification()' on a null object reference" Can you help me pls?
@CodingDemos
@CodingDemos 4 жыл бұрын
Hi, did you initialize FirebaseAuth?
@cholzdelrosario
@cholzdelrosario 5 жыл бұрын
Thanks for sharing this ! you saved my ass !
@gayatrianushka5656
@gayatrianushka5656 4 жыл бұрын
I'm making an app in kotlin and I'm trying to follow the same steps using kotlin code but I have a few errors and I'm a beginner.. could you help me? Would appreciate any help.
@CodingDemos
@CodingDemos 4 жыл бұрын
Hi, may I know what are those errors?
@gayatrianushka5656
@gayatrianushka5656 4 жыл бұрын
@@CodingDemos I'm still able to login using a fake email ID and when I try to put an isVerified condition it still accepts even the valid and non verified emails and logs in to the app.
@dom2760
@dom2760 5 жыл бұрын
DId you have to enable "Add firebase authentication to your app" for the dependencies, I'm having trouble with that, it keeps saying "Failed to resolve: firebase-auth-15.0.0" i don't know what to do
@CodingDemos
@CodingDemos 5 жыл бұрын
Hi, yeah I did add that in the first video of this firebase series
@dom2760
@dom2760 5 жыл бұрын
would this be the updated version? 16.0.1:15.0.0 ? If you done it back in 2017 that video won't apply to the error i'm currently getting
@CodingDemos
@CodingDemos 5 жыл бұрын
I'm using this version of the library: com.google.firebase:firebase-auth:16.0.3
@user-bt1ye9ul4d
@user-bt1ye9ul4d Жыл бұрын
Why are My Sign-Up Verification Emails Going to Spam?
@veniss3554
@veniss3554 3 жыл бұрын
bro need full code overview....
@sat_talk
@sat_talk 3 жыл бұрын
Thanks.. But how do we send email verification to the admin who after verifying only user could login?
@CodingDemos
@CodingDemos 3 жыл бұрын
Hi, do you want the admin to verify each user manually before the user can login?
@sat_talk
@sat_talk 3 жыл бұрын
@@CodingDemos Thanks for quick responce bro..yes. I want only new user registration verification should go to admin, and after only Admin verifies the user, he could login.. thereafter user login normally with his current email id and password
@CodingDemos
@CodingDemos 3 жыл бұрын
@@sat_talk I think only the user can verify him/herself after registration. I'm not sure if there is a way for the admin to verify each user in the Firebase console.
@praveenchandra4448
@praveenchandra4448 5 жыл бұрын
To check whether the email is verified you have used isEmailVerified() Similarly to check whether a mobile number is verified or not for mobile authentication is there a method??
@CodingDemos
@CodingDemos 5 жыл бұрын
Hi, i'm not really sure if there is one for mobile number
@praveenchandra4448
@praveenchandra4448 5 жыл бұрын
@@CodingDemos ok thank u for the reply
@CodingDemos
@CodingDemos 5 жыл бұрын
Your welcome :)
@Galactic2030
@Galactic2030 5 жыл бұрын
Plz insert your cod in description Thanks for you
@CodingDemos
@CodingDemos 5 жыл бұрын
Hi, the source code is available at this link: github.com/codingdemos/FbApp
@Galactic2030
@Galactic2030 5 жыл бұрын
@@CodingDemos Thank you so much 🌹🌹😍😍 I follow you on GitHub
@CodingDemos
@CodingDemos 5 жыл бұрын
Your welcome and thanks for the follow. happy coding :)
@gabrielcangiano4574
@gabrielcangiano4574 3 жыл бұрын
How many e-mail can firebase send to users?
@CodingDemos
@CodingDemos 3 жыл бұрын
I'm sorry, I'm not really sure if they set a limit for it
@youssefmansour5756
@youssefmansour5756 3 жыл бұрын
can you share please the source code !?
@sarthakgupta9236
@sarthakgupta9236 3 жыл бұрын
The password must be of Email Id or any thing it can be ? If I didn't want password, so how can I make this ?
@CodingDemos
@CodingDemos 3 жыл бұрын
Hi, the password can be of any value that you want
@sarthakgupta9236
@sarthakgupta9236 3 жыл бұрын
@@CodingDemos Thanks for your concern and I have facing an error while running the app which is 'The Email is badly formatted'. I apologise for my late response.
@youssefashraf1147
@youssefashraf1147 3 жыл бұрын
everything works fine except that the verification link itself keep loading and not opening! any idea why? thx in advance
@CodingDemos
@CodingDemos 3 жыл бұрын
Hmmm..can you please try to load the verification link in the browser and check if it works?
@youssefashraf1147
@youssefashraf1147 3 жыл бұрын
@@CodingDemos I did but somehow after rerun the code it was loaded successfully no idea why 😂, anyway thank for your caring❤️
@CodingDemos
@CodingDemos 3 жыл бұрын
Hahahahaha. You're welcome 😁
@jayghori8616
@jayghori8616 4 жыл бұрын
sir, ager User apne Email se sign-In karta he to or uske email me verification code jata he leking vo glti se delete ho gya or vo fir se bhejne ki try karta he to dusra verifiaction code nhi jayenga,kyuki uska email ek bar use kar liya yesa dikhenga. ishh problem ka solution !!!!!
@isaozdemir1924
@isaozdemir1924 5 жыл бұрын
Can you send the whole code pls?
@CodingDemos
@CodingDemos 5 жыл бұрын
Hi, here is the link to the source code: github.com/codingdemos/FbApp
@pickemparty
@pickemparty 5 жыл бұрын
Can you share the code?
@MohammadMansourBone
@MohammadMansourBone 5 жыл бұрын
Hi, here is the link to the source code: github.com/codingdemos/FbApp
@sarveshdhawale1669
@sarveshdhawale1669 4 жыл бұрын
Plz send the code
@CodingDemos
@CodingDemos 4 жыл бұрын
Hi, here is the link to the source code: github.com/codingdemos/FbApp
Among Us With 100 Real Players!
10:13
MrBeast Gaming
Рет қаралды 108 МЛН
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 30 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 28 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 196 МЛН
Android Firebase Send a Password Reset Email (Explained)
28:10
Coding Demos
Рет қаралды 30 М.
Remember Me Login Function | Android Studio
12:07
Stevdza-San
Рет қаралды 46 М.
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 217 МЛН
Android Firebase User Registration Tutorial (Explained)
28:02
Coding Demos
Рет қаралды 15 М.
Difference between cookies, session and tokens
11:53
Valentin Despa
Рет қаралды 611 М.
The Most Insane 900 IQ Among Us Outplay!
10:09
MrBeast Gaming
Рет қаралды 116 МЛН
Forgot Password using Firebase Authentication in Android Studio using Java
13:42
Broadcasts & Broadcast Receivers - Android Basics 2023
11:33
Philipp Lackner
Рет қаралды 48 М.
Anonymous Authentication with Firebase in Android!
12:05
Charfaoui Younes
Рет қаралды 3,5 М.
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 30 МЛН