spec/app.rb in warden-github-0.2.0 vs spec/app.rb in warden-github-0.2.1
- old
+ new
@@ -1,18 +1,22 @@
+require 'sinatra'
+
module Example
class App < Sinatra::Base
- enable :sessions
+ use Rack::Session::Cookie, :key => 'rack.session',
+ :secret => 'warden-github-auth',
+ :expire_after => 2592000
enable :raise_errors
disable :show_exceptions
use Warden::Manager do |manager|
manager.default_strategies :github
manager.failure_app = BadAuthentication
manager[:github_client_id] = ENV['GITHUB_CLIENT_ID'] || 'ee9aa24b64d82c21535a'
manager[:github_secret] = ENV['GITHUB_CLIENT_SECRET'] || 'ed8ff0c54067aefb808dab1ca265865405d08d6f'
- manager[:github_scopes] = 'user,public_repo,repo,gist'
+ manager[:github_scopes] = ''
manager[:github_callback_url] = '/auth/github/callback'
end
helpers do
def ensure_authenticated