Class: Auth::SessionsController

Inherits:
Devise::SessionsController
  • Object
show all
Includes:
Concerns::DeviseConcern
Defined in:
app/controllers/auth/sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#create {|resource| ... } ⇒ Object

Yields:

  • (resource)


6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/auth/sessions_controller.rb', line 6

def create
  self.resource = warden.authenticate!(auth_options)
  ## added these two lines
  resource.m_client = self.m_client
resource.set_client_authentication
## end.
  set_flash_message!(:notice, :signed_in)
  (resource_name, resource)
  yield resource if block_given?
  respond_with resource, location: (resource)
end