supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.07k stars 209 forks source link

Poorly Named Email Enabled Property #2053

Closed Crisfole closed 1 week ago

Crisfole commented 8 months ago

Link

The Docs: https://supabase.com/docs/guides/cli/config#auth.email.enable_signup

The Code: https://github.com/supabase/cli/blob/develop/internal/start/start.go#L403

Describe the problem

Is the documentation missing? Or is it confusing? Why is it confusing?

The documentation is very confusing. It says, "Allow/disallow new user signups via email to your project.", but it is used to determine the value of utils.Config.Auth.Email.EnableSignup, which is actually used to set the GoTrue env variable GOTRUE_EXTERNAL_EMAIL_ENABLED. This is very different from signup enabled.

Describe the improvement

A clear and concise description of the improvement.

Honestly, I think the real solution is a breaking change, unfortunately: updating the variable name (and toml setup) to accurately reflect what the variable does. In the meantime thoroughly documenting the weird difference between the name and behavior would be a great start.

Additional context

Add any other context or screenshots that help clarify your question.

None, really.

sweatybridge commented 1 week ago

Screenshot 2024-11-04 at 1 35 39 PM

I took a closer look at this. As far as the hosted platform is concerned, we only expose the external_email_enabled property which is to always set to the same value as Email.EnableSignup. Since we don't distinguish these properties on the platform side, I think it's ok to leave it the same way on local dev as well.