Using Supabase Auth to update user's email address

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:

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.

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

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

We are still working on upgrading to the v2

1 Like

Thank you @Alexis :pray:

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.

1 Like

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

Expected by the end of this month

2 Likes