Configuration

Configuration reference

Development 0.2.0.dev · Reviewed 2026-09-07

Set these values inside AddAuth.configure in config/initializers/add_auth.rb. This reference covers implemented development behavior.

Host settings

SettingDefault / requirementPurpose
base_urlHost must configurePublic origin used for sign-in links; HTTPS outside a local trial.
mail_fromHost must configureSender address for sign-in mail.
rate_limit_storeHost must configureShared cache backing the rate policy.
eligiblePermits matching accountsCallback for your confirmed/locked/disabled account policy.

For a host whose account model implements these predicates, eligibility could be:

Ruby
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

SettingDefaultMeaning
session.enabledfalseEnabled by the session adoption generator.
session.lifetime43_200 secondsAbsolute lifetime: 12 hours.
session.idle_timeout1_800 secondsIdle lifetime: 30 minutes.
session.legacy_bridge_untilUnsetExplicit cutoff for migration of old signed-ID sessions.

Email links

SettingDefaultMeaning
email_link.enabledfalseEnabled by the email-link generator.
email_link.token_lifetime1_200 secondsLink validity: 20 minutes.
email_link.same_browserfalseRequire the requesting browser when enabled.

Rails duration helpers work here: config.email_link.token_lifetime = 10.minutes.

Presentation and captcha

SettingDefaultDetails
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:closedProvider 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.

Something unclear? Suggest a correction Release status

Search documentation

Type to find a guide.

Use Tab to move through results. Escape closes search.