Rails Authentication From Scratch

screenshot of Rails Authentication From Scratch
rails

A step-by-step guide on how to build your own authentication system in Rails from scratch.

Overview

The document explains how to create a Rails authentication system from scratch without relying on a gem like Devise. It emphasizes the ability to customize authentication to exact preferences and highlights the importance of security and best practices in development.

Features

  • Roll Your Own Authentication: Customize the authentication system to your liking.
  • Edge Case Management: Learn to handle edge cases while maintaining security in authentication.
  • Continuous Updates: The guide is updated to incorporate best practices for development.

Step 1: Build User Model

rails generate model User
rake db:migrate

Step 2: Add Confirmation and Password Columns to Users Table

rails generate migration AddConfirmationToUsers confirmed_at:datetime
rake db:migrate
rails
Ruby on Rails

Ruby on Rails, often referred to as Rails, is an open-source web application framework written in Ruby. Known for its convention over configuration and don't repeat yourself (DRY) principles, Rails simplifies and accelerates the development of database-backed web applications.

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.