Enable Two-Factor Authentication
User modules in Brezel support 2-factor authentication. You can configure 2FA settings for each module and even define them individually for each user, depending on its fields.
Setup
Configure your users module as usual. Then, define 2FA settings inside options.two_factor
:
Providers
There are currently two providers available:
Email (email
)
Send the auth code per email, via the email
field. Requires mail settings to be defined in the user’s client.
Options:
view
(string
): Name of the mail view used to build the auth code mailable. The mail view has access to these variables:user
(User
)code
(string
)
SMS (sms
)
Send the auth code per text messages, via the phone
field. Requires Twilio settings to be defined in the client,
defined by twilio_sid
, twilio_token
and twilio_number
.
Dynamic settings
Settings can be applied dynamically per user via recipe injections, similar to recipes in layout elements. Simply define
a recipes
block in the scope of the attributes you want to change dynamically: