auth
auth copied to clipboard
Inconsistent 'signup disabled' errors
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
When signups are disabled and user tried to sign up, some auth methods return information about signups being disabled, some fail with internal server error.
To Reproduce
When signups are disabled (by [auth.enable_signup] set to true in config.toml):
- calling
auth.signUpwith email+password input (from@supabase/supabase-js)//signup(insupbase/authrepository) throws error:
Signups not allowed for this instance
- calling
auth.signInWithOAuth//callbackwith Google provider redirects back to the page with parameters:
?error=access_denied&error_code=422&error_description=Signups+not+allowed+for+this+instance
- calling
auth.signInWithIdToken//token?grant_type=id_tokenwith Google provider (as described here ) throws:
"name":"AuthApiError","message":"Internal Server Error", "status":400
I suspect this is due to createAccountFromExternalIdentity throwing unprocessableEntityError and token login handler forwarding this as Internal Server Error
Expected behavior
The endpoint /token?grant_type=id_token to pass the unprocessableEntityError to the client with message about signups being disabled.
System information
- OS: macOS
- Version of supabase-js: 2.43.6
- Version of auth-js: 2.64.2
- Version of supabase-cli: 1.172.2
- Version of Node.js: 20.11.1