Skip to content

Instantly share code, notes, and snippets.

@frnsys
Created January 30, 2013 19:05
Show Gist options
  • Save frnsys/4675799 to your computer and use it in GitHub Desktop.
Save frnsys/4675799 to your computer and use it in GitHub Desktop.
Omniauth initializer for Google Reader
require 'yaml'# Load auth config
AUTH_CONFIG = YAML.load_file("#{::Rails.root}/config/auth.yml")[::Rails.env]
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, AUTH_CONFIG["client_id"], AUTH_CONFIG["client_secret"], {
scope: 'https://www.googleapis.com/auth/userinfo.email https://www.google.com/reader/api/'
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment