Sign Up / Login [VS] Store value / Get value [Confusion]

Hi:

Something is confusing me here!

What is the difference between “Sign Up / Login” & “Store value / Get value”?

Because its possible to save here:

… and its possible to save here:
3

Does a user can store/read a value in the database without a “Sign Up” process?

What is the best method to work with this?

Thank you!

Here is the difference.

Firebase has three main elements.

  1. Authentication
  2. Database
  3. Storage

Authentication allows you to register users, and receive tokens for authorizes users, integrate with Google sign in, facebook etc. All it does is allow you to create users, and authenticate.

The Database stores the textbased data. What you are doing in your blocks is using firebase as an authentication system, which yes it is possible. The problem is with the rules of the database and making sure it is secure.

No a word of warning. The KODULAR SPECIFIC Authentication component does NOT integrate with the Database component. IN other words, just because you are authorized on the Authentication component, does not mean you are authorized on the Database component, so any database specific rules will not apply. There is another extension for firebase authentication that allows you to do that.

Make sense?

3 Likes

Hi cian, thank you so much for your great reply!

I’m trying to understand in pratice what you described in your reply!

What is the best method to work with the rules, to make sure that secure is granted? How to setup the rules?

Can you please tell me what extension are you mention here?

Thank you so much.

This is the extension I use

DB security is established by a combination of rules and authentication. Assuming you have authenticated with the above extension here are the different ways to setup rules.

Test/No security. Anybody can read or write

“rules”: {
“.read”: true,
“.write”: true
}

Locked Up/Full security. Nobody can read or write

“rules”: {
“.read”: false,
“.write”: false
}

Only authenticated users can read and write

“rules”: {
“.read”: “auth != null”,
“.write”: “auth != null”
}

Read All, only write their own

“rules”: {
“posts”: {
“.read”: “auth != null”,
“$uid”: {
“.write”: “$uid === auth.uid”
}
}
}

Read and write their own

“rules”: {
“posts”: {
“$uid”: {
“.read”: “$uid === auth.uid”,
“.write”: “$uid === auth.uid”
}
}
}

Hi again cian:

Thank you so much for your great help!

Is the Firebase Authentication extension V.3 the last version?
I’ll use this extension for sure!

Ok, so, for what I understood, in a normal situation, can this settings be used?
“rules”: {
“.read”: true,
“.write”: “auth != null”
}
All users can read, but only auth users can write… is that correct?

That looks good to me. I think you have it. And Yes. V3 is the latest that I know of. Its not perfect, but I got it to work.

Make sure you use the Checkmark for the solution. I spent a lot of time on those configs, so I hope others can find them in the search.

Hi again cian:

Thank you so much! Great help!

Checked Solution :wink:

Hug

thereis another firebase extesnion for auth user and make the database safe. Look in thunkable for that. Firebase AUth but it will cost a few dollar, and a free one is also out there

1 Like

Free is good! :wink:

The extensions I mention above is the one Phillipp is talking about.

1 Like

@cian :

Initially I used the “Firebase Authentication” component that appears on the Kodular palette:
01

I imported the “Firebase Authentication V.3.0 (Update link)” and I got the following messages:

1st
02

and then:
03

The import did not occur!

Any solution for this?

Yes . Restart your browser and reload the project. It is a bug in Creator, but it is not fatal.

Thank you cian! :+1:

Worked great!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.