# Firebase: Replace data without create new values

**URL:** <https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797>\
**Category:** Questions about Thunkable X\
**Tags:** firebase\
**Created:** [October 22, 2019, 5:56am UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797 "2019-10-22T05:56:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![id.salazar88zrunh](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@id.salazar88zrunh](https://community.thunkable.com/u/id.salazar88zrunh)\
**Post date:** [October 22, 2019, 5:56am UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/1 "2019-10-22T05:56:07Z")

</div>

Hello everyone! I need a littel help with Firebase

I am currently develop an app with sign in. Im using real database with Firebase and i want to add an option where the user can replace his password  
I´ve tried already to save again data but i dont want to let users save new data, just modify their own password.  
Is this possible?

Thank you so much for your time!

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [October 22, 2019, 8:28am UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/2 "2019-10-22T08:28:36Z")

</div>

Hello,

Of course it is possible. Password - this data and there is no problem to change the data using a variable and save them back.

---

<div class="post-metadata">

**Author:** ![id.salazar88zrunh](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@id.salazar88zrunh](https://community.thunkable.com/u/id.salazar88zrunh)\
**Post date:** [October 22, 2019, 11:13pm UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/3 "2019-10-22T23:13:42Z")

</div>

Thak you for your answer. I am not sure I understood  
I forgot to say that i am not usign Autentification to this sign in, i just read/save the values from real data base from Firebase

This is how i save data  
I check if password is correct and ther is no empty values

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a61bc6e6f88249874751ff9c8481180674a1a6ab.png)

If i do this i can replace the data Password, but with this option i also can save new values. The users must not be able to create new entries

---

<div class="post-metadata">

**Author:** ![farzam.parto](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/farzam.parto/32/32429_2.png) [@farzam.parto](https://community.thunkable.com/u/farzam.parto)\
**Post date:** [October 23, 2019, 8:39am UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/4 "2019-10-23T08:39:41Z")

</div>

First of all, for security reason, you have to set Rules to your Firebase If you store user’s password manualy in firebase DB!

Then if you have done that, you should set define your users by UserName or ID’s  
After finding user, set the Path/To/Place/ you want users change their password.  
It will always replace the value of Password Table in your DB

**Something Like This:** 👇

 ![26](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/1/91dca30576b456b009c2116344538e34c9c7fcee.png)

---

<div class="post-metadata">

**Author:** ![id.salazar88zrunh](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@id.salazar88zrunh](https://community.thunkable.com/u/id.salazar88zrunh)\
**Post date:** [October 23, 2019, 5:13pm UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/5 "2019-10-23T17:13:58Z")

</div>

Thank you so much for your answer.  
I think i understand the main idea but i dont get the Path/To/Place part.  
Is like to giving an specific “andress” to search? how can i set this in realtime\_db? Could you please give me a real example?  
It would be really helpful to understand the logic behind this instead just copy a code. Thanks a lot

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [October 23, 2019, 6:55pm UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/6 "2019-10-23T18:55:58Z")

</div>

Hi @id.salazar88zrunh

Have you considered using the [Sign In](https://docs.thunkable.com/sign-in-1) component for this?

There’s a full tutorial on this component here:

> [@Sign In Masterpost](http://community.thunkable.com/t/sign-in-masterpost/89993):
>
> This topic will be a thread of posts explaining the different aspects of adding a Sign In component to your app and creating a new version of the Sign In template. [Link to the template here](https://x.thunkable.com/projects/5cff8bd406fec36c2683f09e/Screen1/designer). Part 1: Firebase This post will walk you through creating a Firebase project, adding Email Authentication to the project, and adding your project to a Thunkable project. You can also follow these steps to add a Firebase DB to your Thunkable project - just don’t follow the steps for adding email authentic…

---

<div class="post-metadata">

**Author:** ![id.salazar88zrunh](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@id.salazar88zrunh](https://community.thunkable.com/u/id.salazar88zrunh)\
**Post date:** [October 23, 2019, 7:54pm UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/7 "2019-10-23T19:54:05Z")

</div>

@domhnallohanlon  
Thank you for your answer. I have considered but in this specific app i don´t want to incorporate email Authentication, just a simple LogIn with realtime database.  
Actually it is simpler to replace a password with the components in Authentication but i don´t want to use emails for this app

---

<div class="post-metadata">

**Author:** ![id.salazar88zrunh](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@id.salazar88zrunh](https://community.thunkable.com/u/id.salazar88zrunh)\
**Post date:** [October 23, 2019, 7:56pm UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/8 "2019-10-23T19:56:11Z")

</div>

@farzam.parto  
I have tried this and it works… but at the same time someone can set a new value for userID and a new password and with this make a new user… How do I restrict that option?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:08pm UTC](https://community.thunkable.com/t/firebase-replace-data-without-create-new-values/282797/9 "2024-11-08T12:08:34Z")

</div>


