supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

New auth error codes missing in error object

Open melchiorb opened this issue 10 months ago • 3 comments

Bug report

  • [X] I confirm this is a bug with Supabase, not with my own application.
  • [X] 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

melchiorb avatar Apr 21 '24 18:04 melchiorb

any updates on this ?

RSginer avatar Jun 19 '24 10:06 RSginer

same issue here

Ahmed-seyam avatar Jul 01 '24 11:07 Ahmed-seyam

Seems to be working fine now. @melchiorb Can you confirm it's working and close this issue if so?

tom-at-pixel avatar Aug 16 '24 22:08 tom-at-pixel