# Change user password within the app

**URL:** <https://community.thunkable.com/t/change-user-password-within-the-app/2017967>\
**Category:** Questions about Thunkable X\
**Created:** [August 28, 2022, 5:50pm UTC](https://community.thunkable.com/t/change-user-password-within-the-app/2017967 "2022-08-28T17:50:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsgooden4hr](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@dsgooden4hr](https://community.thunkable.com/u/dsgooden4hr)\
**Post date:** [August 28, 2022, 5:50pm UTC](https://community.thunkable.com/t/change-user-password-within-the-app/2017967/1 "2022-08-28T17:50:11Z")

</div>

Hello,

I’m trying to create a screen where the user can update their password. I’m trying to do this within the app. I don’t see any functionality for this in the FB Sign In Block so I thought about accessing the Firebase REST API directly to change a user’s password. After some research though I see that the API needs a user token which Thunkable doesn’t seem to provide.

I tried the API process with the user ID it didn’t work.

Is there another way to do this? It seems like a simple feature.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [August 28, 2022, 10:25pm UTC](https://community.thunkable.com/t/change-user-password-within-the-app/2017967/2 "2022-08-28T22:25:12Z")

</div>

You can do it with a google cloud function. Not too crazy. I just set one up this weekend.

```auto
const functions = require("firebase-functions");
const admin = require("firebase-admin");
const auth = admin.auth();
const db = admin.firestore();
const cors = require('cors')({ origin: true });

module.exports.updateUser = async function (req, res) {
    cors( req, res, async () => {
       // const pw = req.body.password;
       const pw = req.body.password;
        const uid = req.body.uid;    
           try {
                await auth.updateUser(uid, {
                    password: pw,
                })
            res.status(200).send('User updated')
        } catch (error) {
            console.log(error)
            res.status(400).send(error)
        }
    })
   

}

```

My next plan is to update this to require authentication.

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [August 29, 2022, 5:21am UTC](https://community.thunkable.com/t/change-user-password-within-the-app/2017967/3 "2022-08-29T05:21:10Z")

</div>

> [@dsgooden4hr](#):
>
> I’m trying to create a screen where the user can update their password.

Assuming that you need to change an application user password (as you mentioned FB SignIn block), why not use _SignIn - Reset password_ block ?

 ![screen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/5/15de4d419447771c818926dd82e06bd174a01a9d.png)  
I know, this is when you forget a password, but it’s the easiest way to change it too…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [November 27, 2022, 5:21am UTC](https://community.thunkable.com/t/change-user-password-within-the-app/2017967/4 "2022-11-27T05:21:58Z")

</div>

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