Sha256: 50226b4668e770bef52f164d254821de9e07310771944d23420c47ae6a9e58aa

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 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

use OmniAuth::Builder do
  provider :forge,
           ENV['FORGE_CLIENT_ID'],
           ENV['FORGE_CLIENT_SECRET'],
           {
             client_options: { site: ENV['FORGE_API_BASE_URL'] },
             root_uri: ENV['ROOT_URI'],
           }
end

get '/forge/callback' do
  request.env["omniauth.auth"]["info"].to_json
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-forge-0.1.0 examples/sinatra.rb