devise-pundit-rodauth

Configure secure Rails authentication and authorization with Devise, Pundit, or Rodauth.

21|2|Updated May 24, 2026
One-click install
npx skills add https://github.com/sandeepmvl/rails-skills --skill devise-pundit-rodauth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: devise-pundit-rodauth
Source: https://github.com/sandeepmvl/rails-skills/tree/main/skills/08-devise-pundit-rodauth
Command: npx skills add https://github.com/sandeepmvl/rails-skills --skill devise-pundit-rodauth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI coding agents frequently generate insecure or non-conventional Rails authentication and authorization code, such as using weak password hashing, skipping email confirmation, leaking unauthorized records in index actions, or selecting the wrong auth stack for the use case. This Skill eliminates those errors by providing curated guidance for selecting the correct auth stack and enforcing production-grade secure defaults.

Core Features & Use Cases

  • Stack selection decision matrix: Recommends the optimal auth stack for every use case, including Rails 8 built-in auth for simple apps, Devise + Pundit for standard monoliths, Rodauth for MFA/WebAuthn/compliance needs, and devise-jwt for API-only applications.
  • Secure default configurations: Provides copy-paste ready, OWASP-aligned configuration for Devise and Rodauth, including password length requirements, bcrypt cost factors, brute-force lockout, email confirmation, and password reset expiry.
  • Pundit authorization patterns: Covers policy-per-model structure, the scope pattern for index actions to prevent record leaks, namespaced policies for admin interfaces, and verify_authorized guardrails to catch missing auth checks at development time.
  • Common mistake avoidance: Explicitly calls out and prevents high-risk errors such as open redirects after login, weak password hashing algorithms, long-lived JWTs, and putting authorization logic in models.

Quick Start

Use the devise-pundit-rodauth skill to select the correct authentication and authorization stack for your Rails application and implement secure default configurations for user sign-up, login, and access control.

Frequently Asked Questions about devise-pundit-rodauth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best Rails authentication stack for my application?

The optimal Rails authentication stack depends on your application's complexity: Rails 8 built-in auth works for simple apps, Devise plus Pundit fits standard monoliths, Rodauth handles MFA and WebAuthn, and devise-jwt secures API-only applications.

How do I prevent unauthorized record leaks in Rails index actions?

To prevent unauthorized record leaks in Rails index actions, apply Pundit policy-scoped collection queries using the scope pattern, and enforce verify_authorized guardrails to catch missing authorization checks during development.

How do I configure Devise with secure default passwords and brute-force protection?

Configure Devise with secure defaults by enforcing OWASP-aligned password length requirements, setting appropriate bcrypt cost factors, enabling email confirmation, and activating brute-force account lockout with password reset expiry.

When should I use Rodauth instead of Devise in a Rails monolith?

You should use Rodauth instead of Devise when your Rails monolith requires advanced security features like multi-factor authentication, WebAuthn support, or strict compliance needs that Devise cannot easily provide.

Why does my AI agent generate insecure Rails authentication code with open redirects?

AI agents generate insecure Rails authentication code by skipping email confirmation, using weak password hashing, or creating open redirects after login; this Skill corrects those errors by enforcing production-grade secure default configurations.

Can I use JWT authentication for a Rails API-only application?

Yes, you can use JWT authentication for a Rails API-only application by implementing devise-jwt, ensuring you avoid long-lived JWTs to maintain secure API access control.