authority v0.1.0 Authority.Recovery behaviour

A minimal behaviour for recovering a user account.

Usage

defmodule MyApp.Accounts.Recovery do
  use Authority.Recovery

  @impl Authority.Recovery
  def recover(email) do
    # Send a password reset email to the user
  end
end

Link to this section Summary

Types

An identifier representing a user, such as an email address

Callbacks

Initiates a password recovery process for the user associated with the identifier

Link to this section Types

Link to this type id()
id() :: any()

An identifier representing a user, such as an email address.

Link to this section Callbacks

Link to this callback recover(id)
recover(id()) :: :ok | {:error, term()}

Initiates a password recovery process for the user associated with the identifier.