View Source Charon.AuthChallenge.RecoveryCodeChallenge (Charon v0.0.3-alpha)

An auth challenge implementing MFA recovery codes. Setting up the challenge results in a list of codes for the user to store.

config

Config

Additional config is required for this module under optional.charon_recovery_code_challenge:

Charon.Config.from_enum(
  ...,
  optional_modules: %{
    charon_recovery_code_challenge: %{
      ...
    }
  }
)

The following configuration options are supported:

  • :param (optional, default: "recovery_code"). The name of the param that contains a recovery code.
  • :recovery_code_hashes_field (optional, default :recovery_code_hashes). The string-array field of the user struct that is used to store the hashes of the recovery codes.

Link to this section Summary

Link to this section Functions

Link to this function

challenge_init(conn, params, user, config)

View Source

Callback implementation for Charon.AuthChallenge.challenge_init/4.

Callback implementation for Charon.AuthChallenge.name/0.