Posts

Showing posts with the label send verification email

Firebase Login/Register with email verification

Image
To verify the email address of a user registered in your firebase app in Sketchware, follow the steps given below. 1. In main.xml , add three EditText fields, edit_email , edit_username , and edit_password , and add two Buttons register and login . 2. Add a FirebaseAuth component fauth , a FirebaseDb component user:users , and an Intent component i . 3. Add a Map Variable map , a String variable username , and a Boolean variable emailVerified . 4. Create a new page verify_email.xml . 5. In MainActivity.java , in onCreate event, if user is logged in and email is verified move to ChatActivity or the home page of your app and Finish Activity. And if user is logged in and email in not verified move to VerifyEmailActivity . See image below. The code use in add source directly block: emailVerified = fauth.getCurrentUser().isEmailVerified(); 6. In the event register button onClick , if length of text in all EditText fields is more than 0, set String username to edit_...