Class: Freddie::Handlers::OmniAuth
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#after_perform, #before_perform, #call, call, #context, #finish!, #finished?, #initialize, #layout, #method_missing, #params, #perform_freddie_block, #request, #response, #session
Constructor Details
This class inherits a constructor from Freddie::Handlers::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Freddie::Handlers::Base
Instance Method Details
#perform ⇒ Object
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/freddie/handlers.rb', line 231 def perform = args.shift || {} = { session_key: :omniauth_user, redirect_to: '/' }.merge() path('auth') do path(:provider) do path('callback') do auth = env['omniauth.auth'] session[[:session_key]] = [auth['provider'], auth['uid']] redirect_to [:redirect_to] end end end end |