Skip to content

supabase.auth.signUp() returns { user: null, session: null } despite successful user creation and valid API response #2390

@AfolarinOyelekeRumbl

Description

@AfolarinOyelekeRumbl

Describe the bug

When calling supabase.auth.signUp() method, the returned response contains:

{
  "data": {
    "user": null,
    "session": null
  },
  "error": null
}

However:

  • the user is successfully created in Supabase Auth
  • the network response from the /signup request contains valid user data
  • no error is returned by the SDK

This creates a mismatch between the raw API response and the SDK return value.

I am doing:

const result = await supabase.auth.signUp({
  email,
  password,
  options: {
    emailRedirectTo: `${siteUrl}/login`,
  },
});

What I expect is:

  • data.user to contain the created user object
  • data.session to either contain a session OR explicitly be null when email confirmation is enabled

What is actually happening:

  • both data.user and data.session are null
  • error is also null
  • the user still gets created successfully

Additionally, inspecting the network tab shows the API response includes valid user data, which suggests the SDK may be transforming or discarding the response incorrectly.

Library affected

supabase-js

Reproduction

No response

Steps to reproduce

  1. Enable email confirmation in Supabase Auth settings
    Call:
const result = await supabase.auth.signUp({
  email,
  password,
  options: {
    emailRedirectTo: `${siteUrl}/login`,
  },
});
console.log(result);
  1. Observe:
    Auth user is successfully created
    network response contains user payload
    SDK returns:
{
  "data": {
    "user": null,
    "session": null
  },
  "error": null
}

System Info

System:
    OS: macOS 15.7.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 1.37 GB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 24.4.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /Users/oyelekeafolarin/.npm-global/bin/yarn
    npm: 10.1.0 - /Users/oyelekeafolarin/.npm-global/bin/npm
    pnpm: 10.3.0 - /usr/local/bin/pnpm
    Watchman: 2025.04.28.00 - /usr/local/bin/watchman
  Browsers:
    Firefox: 149.0.2
    Safari: 26.2
  npmPackages:
    @supabase/supabase-js: ^2.106.1 => 2.106.1

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsupabase-jsRelated to the supabase-js library.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions