Cookbook
Auth
Stable
Two-Factor Authentication (TOTP) with Remember-This-Device
A two-step TOTP second factor on top of Devise — QR enrollment, a per-login code challenge, a 14-day signed "remember this device" cookie, and an admin lost-device reset. Uses devise-two-factor + rqrcode, both already in the base image.
Related
Cookbook
Rate Limiting, IP Allowlists & a Request Audit Trail
The sibling security recipe — throttle the login endpoint this guide protects, and log who signed in from where.
Cookbook
Sign in with LlamaPress (SSO)
The other authentication recipe — federated sign-in instead of a second factor on local accounts.
Link
devise-two-factor
Upstream gem docs for the model module, validate_and_consume_otp! and provisioning URIs.