I have spent most of today trying to get Firebase authentication to work with Thunkable. After inserting the Firebase APi key and URL into the proper Settings items, I am unable to get the “Firebase signup” block to add a new user to the Firebase database. Looks to me like the Firebase blocks are new. At any rate, I can’t get them to work. I see there are many more than two year old posts on Firebase but nothing in 2022 or 2023. So one possibility is that the new Firebase Blocks are not yet fully working. Are there any demo apps available with the new Firebase Blocks? I can’t find any example code with the new Firebase Blocks.
The Firebase blocks are not new. They are pretty straightforward, actually. Did you try following the steps or watching the video here? Account Sign In - Thunkable Docs
If it’s still not working, post a screenshot of your blocks. But honestly, there’s rarely anything to troubleshoot with the Sign Up block… it just works. Make sure to enable Email/Password as a sign-in method in Firebase and make sure you have the correct authentication in Thunkable. That link will walk you through the process.
Thanks for your comments, tatiang. I guess if Firebase authentication is easy then I must have made a mistake that is presumably easily fixed. So I will try again. I didn’t use the video you linked but I did use two others that were very similar. I would feel more confident if any example used a Firebase authentication block rather than the generic authentication blocks. But if its easy I should be able to fix it. Thanks for your help. If I have any further problem I will post screenshots.
The above screenshot comes from a button. The button block is hard coded to add the user “email@example.com” to the list of Firebase users for this app. Unfortunately for me, clicking the button does not send a verification email to “firstname.lastname@example.org”. Because there is no verification email sent, my conclusion is that he Firebase signup block may not be working. I can’t make a simpler test case than this. (“email@example.com” and password “hello” are not my username and password.) I can’t see my mistake. I can see that the purple “Firebase signup” block in the screenshot is different than every Thunkable Firebase tutorial i have seen (at least 5 now). Maybe my problem is that I am a newbie and there is a debugger that I am not using? A “print to console” line would help me in this case but seems like debugging tools might be more limited than a traditional high-code IDE.
Those blocks are correct. Can you say more about what you mean by a Firebase authentication block vs. a generic authentication block?
If you look in Authentication —> Users in your Firebase console do you see that email address?
There is no debugging support built in to Thunkable. I use my own method but it’s pretty rudimentary: Debugging in Thunkable X (Video)
“Firebase authentication block” is the purple object with “Firebase sign up” printed inside the purple. A “generic authentication block” does not have the word “Firebase” printed in the purple. A “generic authentication block” has only “sign up” printed inside the purple. I have never seen a working code example that has “Firebase” printed inside of a purple block. I have seen at least 5 working examples of the “generic authentication block”.
I draw the conclusion that the purple “generic signup block” is automatically converted to a “Firebase signup block” by the Thunkable IDE because I have entered a Firebase API key and a Firebase URL into the appropriate dialog boxes in the Thunkable IDE. From all the data I can see, I cannot find any working code example that the Thunkable autoconversion from “generic signup block” to “Firebase signup block” is functioning correctly. All working examples that I can find do not have the word “Firebase” printed inside the purple block.
Authentication–>Users in Firebase console does not show the email address. In addition, the email address never receives any sort of confirmation email.
Because the email does not appear in Authentication–>Users AND the email address never receives a confirmation email, I draw the conclusion that the “Firebase sign up” block is not working.
My issue begs the question: Does Authentication–> Users show the email address before or after the user has replied to the confirmation email?
There is only one sign up block in the Drag and Drop interface and it’s this one:
If you right-click on that block and choose Show Advanced Block, you’ll see this:
Then you can display the green
error block in a label to see if there is an error during the sign-up process.
The email address will show up in the Firebase Console before it has been verified. I notice that I’m seeing the error “undefined” when it works successfully.
Thank you very much, Tatiang. I followed your instructions exactly and was able to get a new user into Firebase. Not sure what my problem was but as soon as I started using the Advanced Block and printing the “error” to the screen things started working right away. The video that you linked does include the suggestion to ALWAYS use the Advanced Block for precisely the reason that the error flag can be used for debugging. I missed that in your linked video on my first viewing. So thanks very much, I have everything working well now.
You’re welcome! I’m glad it’s working now.