View Source Charon.AuthChallenge.TotpChallenge (Charon v0.0.3-alpha)
TOTP-challenge. The otp codes may be generated by the user's device, or can be sent in advance by SMS/email.
config
Config
Additional config is required for this module under optional.charon_totp_challenge
:
Charon.Config.from_enum(
...,
optional_modules: %{
charon_totp_challenge: %{
...
}
}
)
The following configuration options are supported:
:totp_label
(required). Ends up as a TOTP label in apps like Google Authenticator, for example "Gmail".:totp_issuer
(required). Similar to:totp_label
, for example "Google".:totp_seed_field
(optional, default:totp_seed
). The binary field of the user struct that is used to store the underlying secret of the TOTP challenges.:param
(optional, default: "otp"). The name of the param that contains an OTP code.:period
(optional, default 30). The duration in seconds in which a single OTP code is valid.
Link to this section Summary
Functions
Callback implementation for Charon.AuthChallenge.challenge_init/4
.
Callback implementation for Charon.AuthChallenge.name/0
.
Link to this section Functions
Callback implementation for Charon.AuthChallenge.challenge_init/4
.
Callback implementation for Charon.AuthChallenge.name/0
.