Configuration Options
repo: used to point to an already existing repo for ecto
confirmation_template: a mfa tuple that returns html to use when sending confirmation emails.
password_reset_template: a mfa tuple that returns html to use when sending password reset email
forgot_username_template: a mfa tuple that returns html to use when sending forgot username email
id_gen_mod: Points to a Module that contains an gen_user_id(changeset) function
custom_change_mod: Points to a Module that contains an custom(changeset) function. This function runs at the very end of the changeset pipeline on user registration giving you the option to change anything in the changeset before db insert. Must return a changeset.
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
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.
mailgun_domain: string domain for mailgun account.
mailgun_key: string for mailgun account key.
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,
repo: Test.Repo, #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
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"