Firebase Authentication¶
Setup¶
Sign-in Methods¶
Email/Password¶
To enable Firebase Auth Email and Password login in your app you need to enable this feature in the Firebase Console
Google Login¶
To enable Google Login for Firebase Authentication you need to do a few more steps.
- Go to the Authenticaiton Section in the Firebase Console and click on the Google Login
- Set the "Enable" switch to enabled
- Click on the "Whitelist client IDs from external pojects" tab.
- Find your Client ID and add it there. Press the "Add" button and then hit the "Save" button
Client ID¶
Your client ID is in the google-services.json
file you download this file from the Firebase Console. At kodular we have the simple Google Services Tool to get the Client ID you need.
tools.kodular.io/google-services
Methods¶
Email Password Login¶
( Text email
, Text password
)
Try to let an user login with Email and Password.
Params | |
---|---|
email |
Text: The email of the user. |
password |
Text: The password of the user. |
Email Password Sign Up¶
( Text email
, Text password
)
Try to let an user sign up with Email and Password.
Params | |
---|---|
email |
Text: The email of the user. |
password |
Text: The password of the user. |
Get Current User¶
( None )
Try to get the current user if signed in.
Google Sign In¶
( None )
Try to login or sign up the user with Google Login.
Is Signed In¶
Returns true if the user is signed in and false when the user is not signed in
Logout¶
( None )
If the user is signed in, then log the user out.
Update Email¶
( Text email
)
Try to update the email of the current user.
Params | |
---|---|
email |
Text: The new email of the user. |
Update Profile¶
( Text email
, Url profile Picture
)
Try to update the profile of the current user.
Params | |
---|---|
name |
Text: The new name of the user. |
profile Picture |
Url: The new profile picture of the user. |
Events¶
Current User Failed¶
( None )
Triggers when the Method Get Current User
failed to load the current user. This can happen due an error or when there is not user signed in.
Current User Success¶
( Text user ID
, Text name
, Text email
, Text phone Number
, Url profile Picture
)
Triggers when the Method Get Current User
had success. It send information about the user in the event which you can use.
Login Failed¶
( Text provider
)
Triggers when the login of an user failed. This can happen due an invalid email or password. Or and invalid Google Account
Params | |
---|---|
provider |
Text: The type of login provider used. (EmailPassword , Google ) |
Login Success¶
( Text provider
, Text user ID
, Text name
, Text email
, Text phone Number
, Url profile Picture
)
Triggers when the login or sign up of the user was successfull. It send information about the user in the event which you can use.
Sign Up Failed¶
( Text provider
, Text message
)
Triggers when the sign up of an user failed
Params | |
---|---|
provider |
Text: The type of login provider used. (EmailPassword ) |
message |
Text: A message of what is wrong with the Sign Up |
User Update Failed¶
( Text type
)
Triggers when the information of the user could not be updated. This can happen because the user wasn't signed in recently or not signed in at all.
Params | |
---|---|
type |
Text: The type of update type used. (Profile , Email ) |
User Update Success¶
( Text type
)
Triggers when the information of the user was successfully updated.
Params | |
---|---|
type |
Text: The type of update type used. (Profile , Email ) |