Project

minnie

0.0
No commit activity in last 3 years
No release in over 3 years
The simplest that authentication can get while still being useful
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

#Minnie

After working with Devise and Clearance, I started to play with OmniAuth. At the time, OmniAuth didn't have much support amongst the auth gems so I wrote my authentication code for it.

Heavily inspired by Ryan Bates' Railscast on Authentication from Scratch, I wrote just enough code to have the authentication working. I pulled a few other ideas out of Devise and Clearance and had a decent looking gist after a while.

Then I had to adapt the code for email/password logins. And then LDAP authentication came up. Eventually, I had refactored it down to the basics that could be reused multiple times.

But copying and pasting a gist into multiple apps gets tiresome quickly. So Minnie was born. I've added email/password authentication as the default strategy for Minnie. But feel free to also check out the OmniAuth and LDAP strategies.

###Install

Add minnie to your Gemfile

 gem 'minnie'

Run minnie's generator to get up and running

 bundle exec rails generate minnie:install

Minnie ships with an email/password authentication strategy that uses Rails' has_secure_password. If that's the way you to like to swing, just run the following:

 bundle exec rails generate minnie:install:user

Of course, you're free to implement your own authentication method in User. Take a look at the default strategy or minnie's LDAP strategy for examples.

You're all done! Log into the console and create a test user

 User.create :email => 'test@test.com', :password => 'test'

And then try to sign in to your app at /signin.

###Issues

There isn't much code here so try resolving issues on your own. If you get some issues fixed, send me a pull request!

If you're not making any headway, just create an issue and I'll try to look at it.