GetUserInfo block retrieves user info and returns info through GotUserInfo event.
You can use UpdateProfile block to update currently signed user's name and profile picture (should be url).
If I wanted to verify the email, via the âVerifyEmailâ method, of a new user who registers,
in which position and in which block of âEventsâ should I put the âVerifyEmailâ method?
I tried putting the âVerifyEmailâ method in the âEventsâ block âwhen FSA1.SignUpSuccessfulâ and below I describe what happens:
_ the new user enters his e-mail
_ the user enters his password
_ the user repeats his password to check.
_ the user clicks the âSignupâ button.
_ the user receives the e-mail from Firebase to verify his e-mail address but even if he doesn't click on the verification link in the e-mail he received, it is already âSignedInâ
so the verification e-mail received from Firebase is completely useless.
Where am I going wrong?
I would like the user to result âSignedInâ only after he clicks on the verification link contained in the e-mail received from Firebase, not immediately after he clicks on the âSignupâ button that performs âcall FSA1.SignUpWithEmail - email - passwordâ.
This is how Firebase works, the user will be signed in but the "verified" value will be "false" until the user verifies their email. You can prevent access by monitoring the value of verified. If you can do this with this extension I do not know, but it should be possible, within the app.
See here for how I did it with the web component.
You can apply a secure rule in your firebase project to handle this (the example below gives read access but denies write access unless the user has verified):
{
"rules": {
".read": "auth != null",
"gmailUsers": {
"$uid": {
".write": "auth.token.email_verified == true && auth.token.email.matches(/.*@gmail.com$/)"
}
}
}
}
Ok, thank you
Where must I put your secure rule?
In Firestore Database rules or
in Realtime Database rules or
in Storage rules ?
These are my current rules:
Firestore Database rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
Realtime Database rules
{
"rules": {
".read": true,
".write": true
}
}
Storage rules
rules_version = '2';
// Craft rules based on data in your Firestore database
// allow write: if firestore.get(
// /databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin;
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if true;
}
}
}
The rules I showed are for realtime database. They are much the same for firestore and storage, but the syntax is different for each.
Thank you for providing a great extension.
I am currently trying to implement your extension in my app by following the guide you provided and the discussion in the comments.
Signup/in with email address/password seems to work fine. After completing this, I confirmed that a new user record is added in the Firebase Authentication-User tab.
However, my goal is to implement Google login functionality in my app, and when I select the Google account on my device with the [GLogin] button in the FSA.aia project and press [Check] and [GetToken], everything seems to be displayed normally. But LogInSuccessful doesn't seem to work. Even after selecting a Google account, there is no change in the Label1 text. And why doesn't it add record of the account logged in with Google in the Firebase Authentication-User tab, just like with the email address/password login?
I am not sure what more information I should provide to solve my problem. Please let me know if you need more information.
Hello, I would like to know if in the future it would be possible to split the extension into two aix files as Firebase storage will soon become paid. There would therefore be:
- a file for the authentication part
- a file for the storage part
Thanks in advance,
Nico
Are you sure about that? Link ?
Yes, you may have to upgrade to a PAYG Blaze plan, but you get the same "Always free tier" that you get for the Spark plan, before charges start happening.
https://firebase.google.com/docs/storage/faqs-storage-changes-announced-sept-2024
Sorry, I didn't notice that...
Nico
I refer you to my response above. Nowhere does it say that firebase storage will become paid, you still get the Always Free tier, which is the same as Spark plan.
Excuse me, I hadn't noticed...
Sorry again,
Nico