lib/sinatra/auth/github.rb in sinatra_auth_github-0.0.9 vs lib/sinatra/auth/github.rb in sinatra_auth_github-0.0.10

- old
+ new

@@ -31,11 +31,11 @@ def github_user warden.user end def github_request(path) - response = RestClient.get("https://github.com/api/v2/json/#{path}", {:accept => :json, :params => {:token => github_user.token}}) + response = RestClient.get("https://github.com/api/v2/json/#{path}", {:accept => :json, :params => {:access_token => github_user.token}}) JSON.parse(response.body) end def _relative_url_for(path) request.script_name + path @@ -47,10 +47,10 @@ manager.default_strategies :github manager.failure_app = app.github_options[:failure_app] || BadAuthentication manager[:github_secret] = app.github_options[:secret] - manager[:github_callback_url] = app.github_options[:scopes] || 'email,offline_access' + manager[:github_scopes] = app.github_options[:scopes] || 'email,offline_access' manager[:github_client_id] = app.github_options[:client_id] manager[:github_callback_url] = app.github_options[:callback_url] || '/auth/github/callback' end app.helpers Helpers