Sha256: 0be74feb5860c51e88080c5cfe2bf2473f69b458f44fff5b39958bcdf1261b45

Contents?: true

Size: 695 Bytes

Versions: 4

Compression:

Stored size: 695 Bytes

Contents

# Sample app for GaggleAMP Strategy
# Make sure to setup the ENV variables GAGGLEAMP_KEY and GAGGLEAMP_SECRET
# Run with "bundle exec rackup"

require 'bundler/setup'
require 'sinatra/base'
require 'omniauth-gaggleamp'

class App < Sinatra::Base
  get '/' do
    redirect '/auth/gaggleamp'
  end

  get '/auth/:provider/callback' do
    content_type 'application/json'
    MultiJson.encode(request.env['omniauth.auth'])
  end

  get '/auth/failure' do
    content_type 'application/json'
    MultiJson.encode(request.env)
  end
end

use Rack::Session::Cookie, :secret => 'change_me'

use OmniAuth::Builder do
  provider :gaggleamp, ENV['GAGGLEAMP_KEY'], ENV['GAGGLEAMP_SECRET']
end

run App.new

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
omniauth-gaggleamp-0.1.2 example/config.ru
omniauth-gaggleamp-0.1.1 example/config.ru
omniauth-gaggleamp-0.1.0 example/config.ru
omniauth-gaggleamp-0.0.1 example/config.ru