phone_verification v0.3.0 PhoneVerification

Link to this section Summary

Link to this section Types

Link to this type verification_code()
verification_code() :: String.t()

Link to this section Functions

Link to this function check(params)
check(%{
  phone_number: PhoneVerification.PhoneNumber.t(),
  verification_code: PhoneVerification.verification_code()
}) ::
  {:ok, %{message: String.t()}}
  | {:error, %{message: String.t(), code: String.t()}}

Callback implementation for PhoneVerification.Provider.check/1.

Link to this function start(params)
start(%{
  :phone_number => PhoneVerification.PhoneNumber.t(),
  :via => :sms | :call,
  optional(:locale) => String.t(),
  optional(:code_length) => non_neg_integer(),
  optional(:custom_code) => PhoneVerification.verification_code()
}) ::
  {:ok,
   %{
     message: String.t(),
     carrier: String.t(),
     seconds_to_expire: non_neg_integer()
   }}
  | {:error, %{message: String.t(), code: non_neg_integer()}}

Callback implementation for PhoneVerification.Provider.start/1.