Hello Koders! In this guide, I’m going to explain how to use the “Firebase Authentication” component in yoour apps and it’s utilities. I hope you find it useful
What is Firebase Authentication?
Firebase Authentication is a service that allow your users to log in and sing up into your app. Basically, you can have a login service for free with this componet/service.
You don’t need any extension, because already have it.
How to add it?
It’s simple. Go to the section on your designer and drop the component to your screen.
Configure it…
Firebase Configurations
1. Add your APP to Firebase
First, go to your console. Select your APP project. (If you don’t have it, create one. Remember not to enable Google Analytics)
To create your APP, click on the Android Logo , and complete ALL THE STEPS. The SHA-1 key is in your Account Settings at the top right of your creator.
Then, upload your ==google-services.json
== file to your app assets
2. Enable login methods
Go to AUTH settings / Sign-in Methods and enable Google, EMAIL and PHONE methods. (You can enable only what you want to use on your app)
Blocks
Current User Failed
The action that happens when there was an error loading the Firebase User
Current User Sucess
When the Firebase User loads correctly
- User ID → ID of the user on
- name → What is the user name
- email → User’s email
- phone Number → User’s phone number (If it’s exist)
- profile Picture → User’s profile picture
Get ID Token
It get the ID Token of a user as a variable. It need the block get ID TOKEN
Login Failed
When a user failed to login (Because an internet error, wrong email/password…)
- Provider → Login method the user used (Google, Email or phone numer)
Login Success
When the user login correctly and with success.
- Provider → Login method the user used (Google, Email or phone numer)
- user ID → The ID of the user
- name → The name of the user
- email → User’s email
- phone Number → User’s phone number
- profile Picture → User’s profile picture (Image)
Reset Password of Email
When the user reset correctly their password (Email METHOD)
- sucess → Return true if the password reset email has been sent correctly
Sign UP Failed
When the user’s sign up failed
- provider → Sing up METHOD
- message → The error that the APP gets
Sign UP Success
When the user sign up correctly (Normally with Email or Phone Number METHOD, because you don’t need to sign up with method
- Provider → Login method the user used (Google, Email or phone numer)
- user ID → The ID of the user
- name → The name of the user
- email → User’s email
- phone Number → User’s phone number
- profile Picture → User’s profile picture (Image)
User UPDATE success
When the user update his profile correctly
- type → The data that the user has update
Email Password Login
Login with EMAIL METHOD
- email → TEXT INPUT of user’s email
- password → TEXT INPUT of user’s password
Email Password Sign UP
Sign UP with Email METHOD
- email → TEXT INPUT of user’s email
- password → TEXT INPUT of user’s password
Get User
Get the current user that is signed
Get ID Token
Call the block that gets the user ID TOKEN
Google Login
Login with Google Method. Use Login Success block to get user info.
Is signed in?
Return true
if the user is signed and false
if not
Logout
Logout of the current user
Phone Number Sign In
Try to sign in with the phone number method
- phone number → Input the number’s phone
Send Reset Password Email
Send the email to reset the user’s password
- email → TEXT INPUT the user’s email
Update EMAIL
Try to update the user’s email. The user must be sign in onto the APP
- email → TEXT INPUT the user’s email
Update PROFILE
Try to update the user’s profile. The user must be sign in onto the APP
- name → Change the user’s name
- profile Picture → Change the profile image
Verify EMAIL
Try to verify the email. The user must be sign in onto the APP
Verify Phone CODE
Try to verify Phone Code with the code
that the user recieved by SMS
It helps you?
- Yes! It’s impresionant
- No…
0 voters
With , by Javier