nurelm/serverfu — pull request #3 by ninjapanzer (2014-02-18 03:54:42+00:00)
Title: Pks/devise google oauth2

#### What we have here is an integration of devise with oauth for google

I know this PR is big but it is mostly devise boiler plate

The heavy work is in:

- `controllers/users/omniauth_callback_controller.rb`
- `models/user.rb`

#### Overview

- Devise provides login services
- Oauth acts as middle way to allow login through an external service
- I figure this is a good idea due to NuRelm's google apps usage
- Additionally a new role / model can be defined with devise to allow user to see specific application uptime

#### Some things came along for the ride

- 2 new gems
- an update to the nav_link helper allowing passthrough of the link_for options hash
- user model

#### What you need to test

1. Google Client Keys - Checkout `.google_oauth2_env` for some instructions
3. New Models

rake db:migrate

2. An admin user - you can run `rake db:seed` to populate a default

user: admin@serverfu.com
pass: password

3. run

rails s

4. Check it out in your browser.

There are a two types of signin. The normal user/pass and Sing in with google which will redirect you to the google login screen