Authentication factor enrolment — register a device or channel for multi-factor authentication.
This is distinct from Weavr.StepUp (which manages per-operation
challenges). Authentication factors are one-time setup that enrols
the user's device so that step-up challenges can be sent to it.
Confirmed endpoints (from Weavr error-handling docs and curl examples)
POST /authentication_factors/otp/{channel}— initiate enrolment OTPPOST /authentication_factors/otp/{channel}/verify— verify enrolment
Channels
Currently supported: "SMS", "AUTHY" (Twilio Authy).
Sandbox note
On Sandbox, the verification code is always "123456".
Summary
Functions
Initiates enrolment of an authentication factor channel.
The supported authentication factor channels.
Verifies the OTP code to complete authentication factor enrolment.
Functions
@spec enrol(Weavr.Config.t(), String.t(), String.t()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Initiates enrolment of an authentication factor channel.
POST /authentication_factors/otp/{channel}
This triggers an OTP to be sent to the user via the given channel.
On Sandbox, the code is always "123456".
@spec supported_channels() :: [String.t()]
The supported authentication factor channels.
@spec verify_enrolment(Weavr.Config.t(), String.t(), String.t(), String.t()) :: {:ok, map()} | {:error, Weavr.Error.t()}
Verifies the OTP code to complete authentication factor enrolment.
POST /authentication_factors/otp/{channel}/verify
On Sandbox, the code is always "123456".