---
title: Use built-in Rails 8 Authentication for greenfield projects
impact: MEDIUM
impactDescription: Use the native, lightweight authentication system to reduce dependency on Devise.
tags: rails, rails8, authentication, security
---

## Use built-in Rails 8 Authentication for greenfield projects

Use the native, lightweight authentication system to reduce dependency on Devise. Use `bin/rails generate authentication` for new projects unless complex features mandate a library.

**Incorrect:**

```ruby
# Adding Devise by default without evaluating built-in needs
bundle add devise
```

**Correct:**

```bash
# Using Rails 8 built-in generator
bin/rails generate authentication
```

**Tools:** Manual Review
