Skip to content

Meta-data is overwritten with subsequent signup requests #395

@naegelin

Description

@naegelin

Bug report

Describe the bug

Possible security vulnerability

When sending a signUp api call to an already existing user with attached meta-data, the user's existing meta-data is overwritten in an unauthenticated context.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Find a user that exists and has existing meta-data in your supabase project
  2. Issue another signUp api request for that same user's email with new meta-data
  3. observer the meta-data on the API response

const { user, session, error } = await supabase.auth.signUp({
        email: email,
        password: password,
    },{
        data:{
            phone: phone,
            name: name,
            company: company
        }
    })

Expected behavior

  1. If a user is already signed up, the metadata should not be updated
  2. Nice to have: If a user is already signed up the API should respond with something like HTTP status code 409 instead of User object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions