Skip to content
Rails authentication from scratch
Ruby HTML CSS JavaScript
Branch: master
Clone or download
Latest commit 46b8a49 Oct 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Add build status badge Sep 6, 2019
app Introduce Rubocop Sep 20, 2019
bin Update Rails to 6.0 Aug 23, 2019
config Introduce Rubocop Sep 20, 2019
db Let rails reformat schema file Nov 5, 2018
lib Introduce Rubocop Sep 20, 2019
log Upgrade to Rails 4 Aug 8, 2015
public Add favicon Sep 15, 2017
spec Introduce Rubocop Sep 20, 2019
tmp Update to Rails 5 Nov 19, 2016
vendor/assets
.gitignore Update to Rails 5 Nov 19, 2016
.pryrc Upgrade to rails 5.1 Jul 4, 2017
.rspec
.rubocop.yml Introduce Rubocop Sep 20, 2019
.ruby-version Add more postgres config to github action Sep 6, 2019
Gemfile
Gemfile.lock Bundle update Oct 6, 2019
README.md Introduce Rubocop Sep 20, 2019
Rakefile Introduce Rubocop Sep 20, 2019
config.ru Update to Rails 5 Nov 19, 2016

README.md

Decent Authentication

Build Status Code Climate

Decent Authentication is a sample application that implements authentication in Rails without the use of a third-party generator or engine. You might often hear the advice that you should not "Roll your own authentication" but that doesn't mean you have to use a gem.

Features:

  • Only allow enabled users to sign in
  • Request password reset via email
  • Forward to protected routes upon successful sign in

Secure defaults:

  • Passwords must be 8 alphanumeric characters
  • Password reset requests expire after 2 hours
  • Session cookies expire after 30 minutes

Demo

Dependencies

  • Ruby 2.6
  • PostgreSQL

Getting Started

Run the setup script, start the server, then click 'Create Account' from the sign in screen.

# install gems, create database.yml config, and setup the database
./bin/setup

Testing

# run the test suite
./bin/rake
# run the test suite as well as brakeman, simplecov, rails_best_practices, and rubocop
./bin/rake analyze
You can’t perform that action at this time.