Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maprihoda/primal_auth
A Ruby on Rails example application with authentication built from scratch.
https://github.com/maprihoda/primal_auth
Last synced: 8 days ago
JSON representation
A Ruby on Rails example application with authentication built from scratch.
- Host: GitHub
- URL: https://github.com/maprihoda/primal_auth
- Owner: maprihoda
- License: mit
- Created: 2011-11-15T17:58:15.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-01T16:08:11.000Z (over 12 years ago)
- Last Synced: 2025-01-09T18:25:03.963Z (16 days ago)
- Language: Ruby
- Homepage:
- Size: 171 KB
- Stars: 12
- Watchers: 6
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# primal_auth
A Ruby on Rails example application with authentication built from scratch.
## Motivation
Full-featured solutions like the Devise engine are often a good choice when authentication is needed. However, I prefer to implement authentication in a Rails app from scratch as I find it much easier to customize than a Rails engine.
## Tell me more
The authentication needs covered are:
* Signing up
* Confirming sign-up by email
* Logging in/out (with email and password)
* Logging in/out with Omniauth
* Remembering logged in user
* Resetting password
* Tracking users (like e.g. last login, last activity, etc.)The application is inspired by Ryan Bates' excellent [railscasts on authentication](http://asciicasts.com/tags/authentication) and the [nifty_authentication generator](https://github.com/ryanb/nifty-generators/blob/master/rails_generators/nifty_authentication/USAGE). I made several modifications to the original code base, added other features (Confirmable, Trackable, Omniauthable), wired everything together into a fully functional Ruby on Rails application, and thoroughly tested everything (mainly unit and integration tests with RSpec and Capybara).
It also takes inspiration from [Devise](https://github.com/plataformatec/devise).
## Installation
Just git clone the application, cd to the root folder and run
bundle
and then
rake db:migrate
rails server -b localhost
The app works ok on Ruby ~> 1.9.2.
## Tests
Run the tests with
bundle exec rspec spec
## TODO
* Lockable
* Timeoutable
* Account deletion
* Migrate to Postgres + add indexes## Contributing
In case of any problems with the app, please file an [issue](https://github.com/maprihoda/primal_auth/issues) here on Github.
If you want to contribute, please fork the project and send me a pull request (tested with RSpec).