authentication
From davila7
Generate Rails 8's built-in authentication system with modern security practices.
Install
/authenticationFacts
- Repository
- davila7/claude-code-templates
- Status
- Actively maintained
- Last commit
Source preview
The instructions Claude Code reads when this command runs.
# Rails 8 Native Authentication Generator
Generate Rails 8's built-in authentication system with modern security practices.
## Purpose
This command helps you implement Rails 8's new native authentication system, eliminating the need for external gems like Devise for basic authentication needs.
## Usage
```
/authentication
```
## What this command does
1. **Generates authentication models** with secure password handling
2. **Creates authentication controllers** for login/logout/signup
3. **Adds authentication views** with modern styling
4. **Implements session management** with security best practices
5. **Sets up authentication helpers** for controllers and views
## Rails 8 Authentication Generator
```bash
# Generate authentication for User model
bin/rails generate authentication User
# Or specify custom model name
bin/rails generate authentication Account
# Generate with custom attributes
bin/rails generate authentication User first_name:string last_name:string
```
## Generated User Model
```ruby
# app/models/user.rb
class User < ApplicationRecord
has_secure_password
validates :email, presence: true, uniqueness: true
validates :password, length: { minimum: 8 }, if: -> { new_record? || !password.blank? }
normalizes :email, with: ->(email) { email.strip.downcase }
before_save :normalize_email
private
def normalize_email
self.email = View full source on GitHub →Other slash commands
feature-development
★ 229,918Workflow command scaffold for feature-development in everything-claude-code.
affaan-mupdated 15d agoMITdatabase-migration
★ 229,918Workflow command scaffold for database-migration in everything-claude-code.
affaan-mupdated 15d agoMITadd-language-rules
★ 229,918Workflow command scaffold for add-language-rules in everything-claude-code.
affaan-mupdated 15d agoMITcommit-push-pr
★ 137,934Commit, push, and open a PR
anthropicsupdated 14d agodedupe
★ 137,934Find duplicate GitHub issues
anthropicsupdated 14d agotriage-issue
★ 137,934Triage GitHub issues by analyzing and applying labels
anthropicsupdated 14d ago