Anonymous functions in the config file are elegant, but they do not work properly with exrm, which generates an Erlang-based sys.config file which cannot use the Elixir syntax. IMHO this configuration style is well suited for prototyping but not for production systems.
For an easy configuration a behaviour PhoenixTokenAuth.MailingBehaviour is defined for constructing the three different emails. It is sufficient to configure the name of the implementing module.
For the user model changeset validator a module and function can be configured instead of an anonymous function.
Anonymous functions in the config file are elegant, but they do not work properly with
exrm
, which generates an Erlang-based sys.config file which cannot use the Elixir syntax. IMHO this configuration style is well suited for prototyping but not for production systems.For an easy configuration a behaviour
PhoenixTokenAuth.MailingBehaviour
is defined for constructing the three different emails. It is sufficient to configure the name of the implementing module.For the user model changeset validator a module and function can be configured instead of an anonymous function.