Sha256: 2d190d5621310e965ac7ea814d688ba6f4138117254eacadfa6ea7439e58b5c2
Contents?: true
Size: 606 Bytes
Versions: 3
Compression:
Stored size: 606 Bytes
Contents
# frozen_string_literal: true require "sinatra" require "sinatra/reloader" # configure sinatra set :run, false set :raise_errors, true set :sessions, true get "/" do content_type "text/html" <<-HTML <html> <body> <form action="/auth/smaregi" method="POST"> <input type="hidden" name="authenticity_token" value='#{request.env["rack.session"]["csrf"]}'> <button type="submit">Connect to Smaregi</button> </form> </body> </html> HTML end get "/auth/:provider/callback" do content_type "application/json" MultiJson.encode(request.env) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
omniauth-smaregi-1.0.0 | example/app.rb |
omniauth-smaregi-0.1.1 | example/app.rb |
omniauth-smaregi-0.1.0 | example/app.rb |