Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent 'signup disabled' errors #1677

Open
2 tasks done
magdalipka opened this issue Jul 24, 2024 · 0 comments
Open
2 tasks done

Inconsistent 'signup disabled' errors #1677

magdalipka opened this issue Jul 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@magdalipka
Copy link

magdalipka commented Jul 24, 2024

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

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.signUp with email+password input (from @supabase/supabase-js)//signup (in supbase/auth repository) throws error:
Signups not allowed for this instance
  • calling auth.signInWithOAuth//callback with 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_token with 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
@magdalipka magdalipka added the bug Something isn't working label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant