View Source Bonfire.Me.Accounts.SecondFactors (bonfire_umbrella v0.9.8-cooperation-beta.31)
Summary
Functions
Sets or updates the TOTP secret. The secret is a random 20 bytes binary that is used to generate the QR Code to enable 2FA using auth applications. It will only be updated if the OTP code sent is valid.
Disables the TOTP configuration for the given account.
Gets the %AuthSecondFactor{} entry, if any.
Validates if the given TOTP code is valid.
Functions
Sets or updates the TOTP secret. The secret is a random 20 bytes binary that is used to generate the QR Code to enable 2FA using auth applications. It will only be updated if the OTP code sent is valid.
Examples
iex> changeset(%AuthSecondFactor{secret: <<...>>}, code: "123456")
%Ecto.Changeset{data: %AuthSecondFactor{}}
Disables the TOTP configuration for the given account.
Gets the %AuthSecondFactor{} entry, if any.
Validates if the given TOTP code is valid.