supabase / supabase-js

An isomorphic Javascript client for Supabase. Query your Supabase database, subscribe to realtime events, upload and download files, browse typescript examples, invoke postgres functions via rpc, invoke supabase edge functions, query pgvector.
https://supabase.com
MIT License
3.29k stars 272 forks source link

New auth error codes missing in error object #1023

Open melchiorb opened 7 months ago

melchiorb commented 7 months ago

Bug report

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

RSginer commented 5 months ago

any updates on this ?

Ahmed-seyam commented 5 months ago

same issue here

tom-at-pixel commented 3 months ago

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