Skip to content

Incorrect type for verifyOtp email_change #2377

@probablykasper

Description

@probablykasper

Describe the bug

When calling

supabase.auth.verifyOtp({
		token_hash: 'example',
		type: 'email_change',
	})

I get the following data value:

{
  user: {
    code: '200',
    msg: 'Confirmation link accepted. Please proceed to confirm link sent to the other email'
  },
  session: null
}

The type of data.user is User which does not match the actual data.

Library affected

supabase-js

Reproduction

No response

Steps to reproduce

No response

System Info

System:
    OS: macOS 13.7.8
    CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
    Memory: 424.32 MB / 40.00 GB
    Shell: 4.3.3 - /Users/k/.nix-profile/bin/fish
  Binaries:
    Node: 24.15.0 - /Users/k/.local/share/mise/installs/node/24.15.0/bin/node
    npm: 11.12.1 - /Users/k/.local/share/mise/installs/node/24.15.0/bin/npm
    Deno: 2.7.12 - /Users/k/.local/share/mise/installs/deno/2.7.12/bin/deno
  Browsers:
    Chrome: 148.0.7778.168
    Firefox: 150.0.1
    Safari: 18.6
  npmPackages:
    @supabase/ssr: ^0.9.0 => 0.9.0
    @supabase/supabase-js: ^2.105.4 => 2.105.4

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

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