# Using Supabase Auth to update user's email address

**URL:** <https://community.weweb.io/t/using-supabase-auth-to-update-users-email-address/6173>\
**Category:** How do I?\
**Tags:** authentication, supabase\
**Created:** [January 2, 2024, 6:30pm UTC](https://community.weweb.io/t/using-supabase-auth-to-update-users-email-address/6173 "2024-01-02T18:30:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takako](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@Takako](https://community.weweb.io/u/Takako)\
**Post date:** [January 2, 2024, 6:30pm UTC](https://community.weweb.io/t/using-supabase-auth-to-update-users-email-address/6173/1 "2024-01-02T18:30:01Z")

</div>

Hi there,  
I’m trying to update user’s email address using Supabase auth.

I installed SupabaseAuth plugin, and I have code below to create a Supabase Auth instance then update a user’s email:

```auto
const supabase = wwLib.wwPlugins.supabaseAuth.publicInstance;

const {data} = await supabase.auth.updateUser({email:'new@email.com'})

```

but this gives `Uncaught (in promise) TypeError: supabase.auth.updateUser is not a function` error.  
Is wwLib.wwPlugins.supabaseAuth.publicInstance still fine to use?  
I wonder what I’m missing.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [January 3, 2024, 9:24am UTC](https://community.weweb.io/t/using-supabase-auth-to-update-users-email-address/6173/2 "2024-01-03T09:24:38Z")

</div>

Hi, you need to refer to the v1 of the supabase sdk documentation

```auto
const { user, error } = await supabase.auth.update({email: 'new@email.com'})

```

We are still working on upgrading to the v2

---

<div class="post-metadata">

**Author:** ![Takako](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@Takako](https://community.weweb.io/u/Takako)\
**Post date:** [January 3, 2024, 5:47pm UTC](https://community.weweb.io/t/using-supabase-auth-to-update-users-email-address/6173/3 "2024-01-03T17:47:24Z")

</div>

Thank you @Alexis 🙏

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [January 4, 2024, 9:23am UTC](https://community.weweb.io/t/using-supabase-auth-to-update-users-email-address/6173/4 "2024-01-04T09:23:59Z")

</div>

But we already have an action to update the current user, please use “Update User Metadata” instead, you can let metadata empty and only update the email.

---

<div class="post-metadata">

**Author:** ![jayjay13](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@jayjay13](https://community.weweb.io/u/jayjay13)\
**Post date:** [January 5, 2024, 8:18am UTC](https://community.weweb.io/t/using-supabase-auth-to-update-users-email-address/6173/5 "2024-01-05T08:18:38Z")

</div>

@Alexis do you have an ETA for the Supabase V2 integration?

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [January 5, 2024, 9:43am UTC](https://community.weweb.io/t/using-supabase-auth-to-update-users-email-address/6173/6 "2024-01-05T09:43:20Z")

</div>

Expected by the end of this month
