Configuration Options
overrides_module: Module that impliments AccessPassBehavior to offer customization of email templates and many other hooks.
repo: used to point to an already existing repo for ecto
distributed: a boolean that will decide on if data should be replicated to other connected nodes.
refresh_expire_in: time in seconds to expire each refresh token
access_expire_in: time in seconds to expire access token
id_len: number of characters in default id generation
phoneix: boolean if you are running accesspass in phoenix. It will set @derive {Phoenix.Param, key: :user_id} if true
from: email address mailgun will be using to send emails.
confirmation_subject: string to override confirmation subject line of email.
reset_password_subject: string to override reset password subject line of email.
forgot_username_subject: string to override forgot username subject line of email.
bamboo email configs: look here for the configs needed. These configs go under config :access_pass, AccessPass.Mailer
base_url: base URL to use for email templates.
ecto configurations: If you want AccessPass to house your instance of Ecto as compared to providing repo: above then check out the getting started section for an example config.
#Example configuration with every option
config :access_pass, AccessPass.Mailer,
adapter: Bamboo.PICKANDADAPTER,
#Please look at the configs from bamboo hex page for what the required configs are.
config :access_pass,
repo: Test.Repo,
phoenix: true,
distributed: true,
sync: true, #Required if already using ecto
mailgun_domain: "https://api.mailgun.net/v3/YOURDOMAIN", #Required
mailgun_key: "key-YOURKEY", #Required
from: YOUREMAIL@example.com, #Required
confirmation_template: {Test.Temps, :conf_template, []}, #check Email Templating
password_reset_template: {Test.Temps, :reset_template, []}, #check Email Templating
forgot_username_template: {Test.Temp, :forgot_user_template, []},#check Email Templating
id_gen_mod: Test.Gen, #Needs to have gen_user_id(changeset) and return {changeset, ID}
custom_change_mod: Test.Gen, #Needs to have custom(changeset) and return changeset
insert_override_mod: Test.Gen, #Needs to have insert_override(changeset) and return {:ok, changeset} or {:error, changeset}
after_insert_mod: Test.Gen, #Needs to have after_insert({:error,cs} OR {:ok,cs}) and return changeset
refresh_expire_in: 3600, #(1hour) defaults to 0(no expire)
access_expire_in: 600, #(10 minutes) defaults to 300(5 minutes)
id_len: 12, # defaults to 6
confirmation_subject: "welcome to my site", # default: "Confirmation email"
reset_password_subject: "please reset password", # default: "Reset your password"
forgot_username_subject: "woops you forgot this", # default: "Forgot Username"
base_url: "https://mydomain.example.com", # default: "https://api.example.com", used in email templates