Sha256: 42a9f5bf02030d0af784e5d9a9a389382848d0a0ead3de77e7650ffada12a557
Contents?: true
Size: 576 Bytes
Versions: 3
Compression:
Stored size: 576 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'sinatra' require 'dotenv/load' require 'bundler/setup' require 'omniauth-forge' use Rack::Session::Cookie, secret: 'abc123' OmniAuth.config.allowed_request_methods << :get OmniAuth.config.silence_get_warning = true use OmniAuth::Builder do provider :forge, ENV['FORGE_CLIENT_ID'], ENV['FORGE_CLIENT_SECRET'], { client_options: { site: ENV['FORGE_API_BASE_URL'] } } end get '/forge/callback' do request.env['omniauth.auth']['info'].to_json end pp Sinatra::Application.routes
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
omniauth-forge-0.2.1.1 | examples/sinatra.rb |
omniauth-forge-0.2.1 | examples/sinatra.rb |
omniauth-forge-0.2.0 | examples/sinatra.rb |