useAuth() wrapper does not support Supabase's metadata

Hi, there!

I’m using Supabase’s auth in my RedwoodJS app.

I noticed that I cannot add user’s metadata (e.g. full_name) using the signUp’s function from useAuth() hook.

To be more clear, the code below doesn’t add ‘full_name’ in Supabase:

const { user, error: signupError } = await signUp({
     email: data.email,
     password: data.password
}, {
    data: { full_name: data.full_name }
})

It works using the ‘client’:

const { user, error: signupError } = await client.auth.signUp({
     email: data.email,
     password: data.password
}, {
    data: { full_name: data.full_name }
})

Any workaround?

Thanks!

I believe this is has been reported in [RFC]: Support Sign Up with Additional Metadata for Supabase · Issue #6146 · redwoodjs/redwood · GitHub

Looks like [Bug?]: Supabase Auth `data` parameter not supported during signUp · Issue #6321 · redwoodjs/redwood · GitHub

Thank you!

Is there any news about it?

I’m working on a huge PR to change how our auth integrations work. We want to finish that one before fixing other auth issues. You can follow along here Decouple auth on the web side by Tobbe · Pull Request #5985 · redwoodjs/redwood · GitHub

It’s probably going to be at least a few more weeks before it’s done.

Good to know!

Thank you :wink: