© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
20 replies
matsyui

Request for Improved Response Status in supabase.auth

It is actually already posted in Sept 26, 2023 on Github but it has no feedback at all
https://github.com/orgs/supabase/discussions/17706

I'd like to open a discussion regarding the current response structure in
supabase.auth
supabase.auth
. Currently, when making requests related to user authentication, we receive JSON responses that look like this:

For invalid credentials:
{"data": {"session": null, "user": null}, "error": [AuthApiError: Invalid login credentials]}
{"data": {"session": null, "user": null}, "error": [AuthApiError: Invalid login credentials]}

For unconfirmed accounts:
{"data": {"session": null, "user": null}, "error": [AuthApiError: Email not confirmed]}
{"data": {"session": null, "user": null}, "error": [AuthApiError: Email not confirmed]}

In scenarios where a user registers but hasn't yet confirmed their email, this "Email not confirmed" string is used in the response. However, this string is subject to change in future updates, making it less reliable for developers to build upon.

I propose that Supabase consider implementing a more standardized status code approach in the response, in addition to or instead of the current error messages. For instance:

For invalid credentials, a status code of 401:
{"data": {"session": null, "user": null}, "error": [AuthApiError: Invalid login credentials], "status": 401}
{"data": {"session": null, "user": null}, "error": [AuthApiError: Invalid login credentials], "status": 401}

For unconfirmed accounts, a status code of 435:
{"data": {"session": null, "user": null}, "error": [AuthApiError: Email not confirmed], "status": 435}
{"data": {"session": null, "user": null}, "error": [AuthApiError: Email not confirmed], "status": 435}

By using standardized status codes, developers can rely on consistent responses and don't have to rely on parsing error message strings, which can change over time.
GitHub
Request for Improved Response Status in supabase.auth · supabase · ...
I'd like to open a discussion regarding the current response structure in supabase.auth. Currently, when making requests related to user authentication, we receive JSON responses that look like...
Request for Improved Response Status in supabase.auth · supabase · ...
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Supabase Auth instead of Auth0?
SupabaseSSupabase / help-and-questions
7mo ago
Trouble with signInWithPassword in Supabase Auth — No response after call
SupabaseSSupabase / help-and-questions
6mo ago
supabase auth
SupabaseSSupabase / help-and-questions
3y ago
Supabase auth for admin panel
SupabaseSSupabase / help-and-questions
14mo ago