Skip to content

Configuration overhaul: make mail-related configuration clearer #654

@josecelano

Description

@josecelano

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 = "[email protected]"
reply_to = "[email protected]"

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).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions