https://github.com/leesmith/decent_authentication
Rails authentication from scratch
https://github.com/leesmith/decent_authentication
authentication ruby rubyonrails
Last synced: 5 months ago
JSON representation
Rails authentication from scratch
- Host: GitHub
- URL: https://github.com/leesmith/decent_authentication
- Owner: leesmith
- Created: 2011-02-04T19:58:10.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T14:52:50.000Z (over 2 years ago)
- Last Synced: 2025-01-20T21:06:45.540Z (6 months ago)
- Topics: authentication, ruby, rubyonrails
- Language: Ruby
- Homepage: https://decent-authentication.herokuapp.com/sign-in
- Size: 944 KB
- Stars: 20
- Watchers: 7
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Decent Authentication
[](https://github.com/leesmith/decent_authentication/actions) [](https://codeclimate.com/github/leesmith/decent_authentication)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 inSecure defaults:
- Passwords must be [8 alphanumeric characters](https://github.com/leesmith/decent_authentication/blob/master/app/models/user.rb)
- Password reset requests [expire after 2 hours](https://github.com/leesmith/decent_authentication/blob/master/app/services/recover_password.rb)
- Session cookies [expire after 30 minutes](https://github.com/leesmith/decent_authentication/blob/master/config/initializers/session_store.rb)[Demo](https://decent-authentication.herokuapp.com/sign-in)
## 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
```