Skip to content

Instantly share code, notes, and snippets.

@nmccarthy
Created July 26, 2012 18:38
Show Gist options
  • Save nmccarthy/3183700 to your computer and use it in GitHub Desktop.
Save nmccarthy/3183700 to your computer and use it in GitHub Desktop.
omniauth.rb initializer file that's been monkey-patched to work with Yammer Staging
Rails.application.config.middleware.use OmniAuth::Builder do
# provider :yammer, 'xxx', 'xxx' #production
# monkey-patch for staging
provider :yammer, 'xxx', 'xxx' #staging
module OmniAuth
module Strategies
class Yammer < OmniAuth::Strategies::OAuth2
option :client_options, {
:site => 'https://www.staging.yammer.com',
:authorize_url => '/dialog/oauth',
:token_url => '/oauth2/access_token.json'
}
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment