Class: Trestle::Omniauth::SessionsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/trestle/omniauth/sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



10
11
12
13
# File 'app/controllers/trestle/omniauth/sessions_controller.rb', line 10

def create
  login!(request.env["omniauth.auth"])
  redirect_to previous_location || instance_exec(&Trestle.config.omniauth.)
end

#destroyObject



15
16
17
18
# File 'app/controllers/trestle/omniauth/sessions_controller.rb', line 15

def destroy
  logout!
  redirect_to instance_exec(&Trestle.config.omniauth.redirect_on_logout)
end

#newObject



6
7
8
# File 'app/controllers/trestle/omniauth/sessions_controller.rb', line 6

def new
  @providers = Trestle.config.omniauth.providers.keys
end