Skip to content

Instantly share code, notes, and snippets.

@thebucknerlife
thebucknerlife / authentication_with_bcrypt_in_rails_4.md
Last active July 10, 2024 00:17
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

#lang racket
(require racket/gui)
;
; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
; I wrote this code five years ago while learning functional programming.
; It is an example of what you should NOT do in a functional language (or in software writing in general).
;
; THIS IS NOT A GOOD EXAMPLE OF RACKET CODE.
;