aboutsummaryrefslogtreecommitdiffstats
path: root/app.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app.rb')
-rw-r--r--app.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app.rb b/app.rb
index 836598b..dd33ca4 100644
--- a/app.rb
+++ b/app.rb
@@ -1,4 +1,5 @@
require 'sinatra'
+require './fancy_bear/fancy_bear'
class App < Sinatra::Base
configure :production, :development do
@@ -16,4 +17,16 @@ class App < Sinatra::Base
post '/sign-up' do
#
end
+
+ get '/auth-begin' do
+ contextio = FancyBear::ContextIO::Auth.new
+
+ redirect_url = contextio.connect("#{request['REQUEST_URI']}/auth-callback")
+
+ redirect to(redirect_url)
+ end
+
+ get '/auth-callback' do
+ erb :auth_callback
+ end
end