Parent issue: #591
Make mail-related configuration more straightforward. There are a couple of options that could be confusing: email_on_signup and email_verification_enabled.
Current version
[auth]
email_on_signup = "optional"
[mail]
email_verification_enabled = false
from = "example@email.com"
reply_to = "noreply@email.com"
New version
[registration]
# Other future options related to registration in addition to mail.
# All options related to mail go into the mail subtype.
[registration.mail]
required = true
verified = true
The new version adds a new section for the registration configuration. That section contains a subtype with two fields for the email:
required: true if the email is mandatory for registration.
verified: true if the app sends a verification email to verify the user's email.
The second one maps directly to the old field email_verification_enabled.
Regarding the first one email_on_signup, it has these values:
required: the user must provide a valid email even if email verification is disabled.
optional: the app shows the email field in the registration form, but the user can omit it. It can be empty. Some user's profiles may have it and others may not.
ignored: the frontend app does not show the email field at all. However, the API accepts that param in the POST request but, it ignores it.
It will be simplified:
- When
required is true the signup form contains the email field and is mandatory.
- When
required is false the signup form does NOT contain the email field and is not mandatory. However in the future, the user can provide an email in the user's profile settings page.
Notes
We have to check some invalid configurations and show an error when the application is starting.
- If
registration.mail.verified is true, the mail server configuration must be provided (it can't be None).
Parent issue: #591
Make mail-related configuration more straightforward. There are a couple of options that could be confusing:
email_on_signupandemail_verification_enabled.Current version
New version
The new version adds a new section for the registration configuration. That section contains a subtype with two fields for the email:
required:trueif the email is mandatory for registration.verified:trueif the app sends a verification email to verify the user's email.The second one maps directly to the old field
email_verification_enabled.Regarding the first one
email_on_signup, it has these values:required: the user must provide a valid email even if email verification is disabled.optional: the app shows the email field in the registration form, but the user can omit it. It can be empty. Some user's profiles may have it and others may not.ignored: the frontend app does not show the email field at all. However, the API accepts that param in the POST request but, it ignores it.It will be simplified:
requiredistruethe signup form contains theemailfield and is mandatory.requiredisfalsethe signup form does NOT contain theemailfield and is not mandatory. However in the future, the user can provide an email in the user's profile settings page.Notes
We have to check some invalid configurations and show an error when the application is starting.
registration.mail.verifiedis true, themailserver configuration must be provided (it can't beNone).