Firebase Login/Register with email verification

To verify the email address of a user registered in your firebase app in Sketchware, follow the steps given below.

1. Follow the Signup/login creating tutorial Here

2. Create a extra button in login page with text "Send Verification Email".


3. In the event of on signin user complete of component of Firebase auth, add code given below(View on Github).


emailVerified =
fauth.getCurrentUser().isEmailVerified();


4. In event of button Send Verification Email,add code given below with an add source directly Block(View on Github).

 

fauth.getCurrentUser().sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() { 
 @Override public void onComplete(Task<Void> task) {
 if (task.isSuccessful()) { 
 showMessage("Email sent.");
 } else {
 showMessage ("Error sending email");} } });


5. Save and run the project.



Comments

Post a Comment

Popular posts from this blog

How to make edittext in dialog in Sketchware

How to use request network for webview in Sketchware

How to make a browser in sketchware