View Source Plausible.Auth.EmailVerification (Plausible v0.0.1)

API for verifying emails.

Summary

Functions

@spec any?(Plausible.Auth.User.t()) :: boolean()
Link to this function

issue_code(user, now \\ NaiveDateTime.utc_now())

View Source
@spec issue_code(Plausible.Auth.User.t(), NaiveDateTime.t()) ::
  {:ok, Plausible.Auth.EmailActivationCode.t()}
  | {:error, :hard_bounce | :unknown_error}
@spec verify_code(Plausible.Auth.User.t(), String.t() | non_neg_integer()) ::
  :ok | {:error, :incorrect | :expired}