phone_verification v0.1.0 PhoneVerification.Provider behaviour
Link to this section Summary
Link to this section Types
Link to this type
phone_number()
phone_number() :: %{
country_code: non_neg_integer() | String.t(),
subscriber_number: String.t()
}
Link to this section Callbacks
Link to this callback
check(%{})
check(%{phone_number: phone_number(), verification_code: verification_code()}) ::
{:ok, %{message: String.t()}}
| {:error, %{message: String.t(), code: String.t()}}
Link to this callback
start(%{})
start(%{
:phone_number => phone_number(),
:via => :sms | :call,
optional(:locale) => String.t(),
optional(:code_length) => non_neg_integer(),
optional(:custom_code) => verification_code()
}) ::
{:ok, %{message: String.t()}}
| {:error, %{message: String.t(), code: String.t()}}