Skip to content

New auth error codes missing in error object #1023

@melchiorb

Description

@melchiorb

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

The new error code (which is correctly sent by the server) is not accessible in auth-js.

Example when using non existend email address on signin:

Server response:
{"code":"otp_disabled","message":"Signups not allowed for otp"}

The error object returned by "supabase.auth.signInWithOtp":
error.code = undefined
error.message = "Signups not allowed for otp"

To Reproduce

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

  1. Trigger auth error
  2. Inspect error object

Expected behavior

error.code = "otp_disabled"

System information

  • Version of supabase-js: 2.42.5
  • Version of auth-js: 2.63.1

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