Set these values inside AddAuth.configure in config/initializers/add_auth.rb. This reference covers implemented development behavior.
Host settings
| Setting | Default / requirement | Purpose |
|---|---|---|
base_url | Host must configure | Public origin used for sign-in links; HTTPS outside a local trial. |
mail_from | Host must configure | Sender address for sign-in mail. |
rate_limit_store | Host must configure | Shared cache backing the rate policy. |
eligible | Permits matching accounts | Callback for your confirmed/locked/disabled account policy. |
For a host whose account model implements these predicates, eligibility could be:
config.eligible = ->(user) { user.confirmed? && !user.disabled? }Adapt this to your model; AddAuth does not define those methods. The callback must reflect the policy you use for sign-in.
Sessions
| Setting | Default | Meaning |
|---|---|---|
session.enabled | false | Enabled by the session adoption generator. |
session.lifetime | 43_200 seconds | Absolute lifetime: 12 hours. |
session.idle_timeout | 1_800 seconds | Idle lifetime: 30 minutes. |
session.legacy_bridge_until | Unset | Explicit cutoff for migration of old signed-ID sessions. |
Email links
| Setting | Default | Meaning |
|---|---|---|
email_link.enabled | false | Enabled by the email-link generator. |
email_link.token_lifetime | 1_200 seconds | Link validity: 20 minutes. |
email_link.same_browser | false | Require the requesting browser when enabled. |
Rails duration helpers work here: config.email_link.token_lifetime = 10.minutes.
Presentation and captcha
| Setting | Default | Details |
|---|---|---|
stylesheet | "/add_auth.css" | A same-origin stylesheet path, or nil. |
css_classes | {} | Semantic class overrides; see styling. |
challenge_on | [] | Actions protected by a configured challenge provider. |
challenge_when_unavailable | :closed | Provider outage policy: :closed or :open. |
Check your changes
Restart the app after changing initializers. Run bin/rails add_auth:doctor, then exercise the affected browser flow. This page covers common session, email, presentation and captcha settings. For the wider implemented development scope and remaining release checks, consult features and roadmap and release status.