FirebaseAddOn Extension (To be sponsored!)

extension

(Carlos Pedroza) #1

FIREBASE ADDON EXTENSION

Hello Builders!

I am super excited to contribute to AppInventor and all its distributions! My efforts are now oriented to develop the Firebase component. In you are interested, you can check this post (at :appybuilder:) if you want to check my progress.

In the meantime, @Andres_Cotes and I bring to you a Firebase AddOn Extension that is very useful specially if you want to authenticate with @mirxtrem_appsFirebaseAuth Extension V3.

Methods

  • Input: Method for registering the FirebaseDB component you want to get or set its FirebaseURL and FirebaseToken. Use can use it when initializing the screen.
    image

  • GetFirebaseToken: Method for getting the firebase token. Returns a string with the firebase token used in the registered FirebaseDB component.
    image

  • SetFirebaseToken: Method for setting the firebase token in the registered FirebaseDB component. Parameters: String: The new firebase token to be set.
    image

  • GetFirebaseURL: Method for getting the firebase URL. Returns a string with the firebase URL used in the registered FirebaseDB component.
    image

  • SetFirebaseURL: Method for setting the firebase URL in the registered FirebaseDB component. Parameters: String: The new firebase URL to be set.
    image

Best practices

In order to register the Firebase component you want to use in the FirebaseAddOn extension, use the input method when initializing the screen. Also, you can use SetFirebaseURL at this moment with an Obfuscated Text block to add a line of security against (instead of adding it in the Designer View).
image

If you are using @mirxtrem_appsFirebaseAuth Extension V3, after signing in with the provider of your choice. Set the FirebaseToken to the idToken you receive from the FirebaseAuthUserData. Also, if you want to use specific project buckets with information of your user, then set FirebaseDB1.ProjectBucket to users/localId for example.
image
image
By doing that, you are now ready to Store and Get values from your private Firebase Database.
image

When the user want to unauthenticate, you can use these blocks:
image
Known Issues about this method from the FirebaseDB component: It is known that the library that the component is using is deprecated. Using unauthenticate method will cause a Firebase error remembering that the library is deprecated. This extension is a temporary but effective solution to authenticate users using the FirebaseAuth extension. NOTE: The error will only appear when using the unauthenticate method. You can catch that error in the FirebaseError event handler.

For more information about Firebase Database rules, please check Firebase’s QuickStart Documentation.

Price

By donating USD$5 or more, I will send you the extension. When the donations reaches USD$40, the extension will be fully sponsored and liberated for free to all users.
Link to donate:

Why support by sponsoring extensions?

  1. Sponsoring gives you the opportunity to reward the developer for its efforts made to bring a feature you like/need in your projects.
  2. Get early access.
  3. Full support.

List of sponsors!

  1. @ivan_moreno
  2. Esko Rissanen
  3. Alexey Burkov
  4. Miguel Tarazona
  5. Michelle Pluas
  6. It can be you!

I want to know!

Now, I have a question for you. By answering it, maybe you can help other extension developers on how to monetize or take a little profit based on their efforts developing extensions. The poll is very simple:

Do you agree with supporting developers by sponsoring their extensions?

  • Definitely, I like to support new features.
  • Yes, but I think the target shouldn’t be greater than USD$50.
  • No, I like free stuff.

0 voters


Anyone Know How To Sure Firebase Using Firebase Rules
(Tiziano) #2

Is it possible to set restricted read/write rules to Db using the extension and to grant authenticated access to specific node? With FirebaseAurh only unfortunately is not possible yet.


(Carlos Pedroza) #3

Yes, you can set those rules and only be accessed by authenticated users with the FirebaseAuthentication Extension V3 and this FirebaseAddOn Extension.

But the rules you have to set them in the Firebase Console, here is the documentation on how to do that.


(Tiziano) #4

Ok I will then try as soon as I can. Thanks for this nice extension.


(Carlos Pedroza) #5

We have a new sponsor! Thank you @ivan_moreno for your contribution!
To be fully sponsored and liberated, we need 7 sponsors more!


(Carlos Pedroza) #6

We have a new sponsor! Thank you Esko Rissanen for your contribution!
To be fully sponsored and liberated, we need 6 sponsors more!


(Carlos Pedroza) #7

We have a new sponsor! Thank you Alexey Burkov for your contribution! To be fully sponsored and liberated, we need 5 sponsors more!


(Carlos Pedroza) #8

We have two more sponsors! Miguel Tarazona and Michelle Pluas! Thank you for your contribution! We need only three more sponsors!


(Hayder Almalky) #9

hi.
sorry but in my country the paypal not supported .
did you have another way to send the money to you.

hayder hashim
[email protected]

thank


(Pepocero) #10

Hola!
Yo compre la extension para no tener el problema del error “permission denied” que sale con firebase cuando las reglas estan puestas para usuarios registrados…
Sigo los pasos que dices en Best Practices pero no hay forma de que funcione. La utilizo junto con FirebaseAth de mirxtrems…
Yo hago una pantalla que es de registro o login, y una vez que se loguean, se abre una nueva ventana… Pero ni bien se abre la primer pantalla de registro o login, ahi ya sale el mensaje de “Permission denied”

Estuve probando todo tipo de combinacion con las reglas de firebase, pero no hay caso… Ahora las tengo asi:

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

para que pueda leer cualquiera y solo escribir los usuarios registrados…
Si un usuario se loguea en una pantalla, tengo que pasar el token del firebase auth a la otra pantalla?

llevo dias con esto y hoy ya me canse y borre todos los bloques que tenia y lo empezare todo de cero… para evitar algun error que se me haya pasado…

De todas formas sobre este tema no hay un tutorial claro. La solucion que dan todos es darles permiso de lectura y escritura a todos en tu firebase… y no creo que eso sea muy seguro… no?

seguire intentando… si al final lo logro hare un tutorial jejeje


(James (An Nguyen)) #11

Hi Dr.Carlos Pedroza @CarlosPedroza27
I just donated
Please send FIREBASE ADDON EXTENSION to Email: [email protected] for me.
Thanks very much!


(James (An Nguyen)) #12

Hi @CarlosPedroza27
I would like to receive this EXTENSION as soon as possible :heart_eyes: