Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: bugfix/use-goo…
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (14 sloc) 0.628 kb

GoogleAuth

What

GoogleAuth is a very, very trivial convenience wrapper around omniauth-google-apps that makes a lot of assumptions, and requires much less setup.

How

1. Your user model must have the string fields name, email, and uid.

2. Add to your Gemfile:

gem 'google_auth'

3. Create an initializer:

# config/initializers/google_auth.rb
Rails.application.config.google_auth.domain = 'yourgoogleappsdomain.com'
# other options: 'user_class', 'path'. See source for details.

4. Set up whichever controller(s) you want protected:

include GoogleAuth::Controller
Jump to Line
Something went wrong with that request. Please try again.