class SimpleTokenAuthentication::SignInHandler

Public Instance Methods

sign_in(controller, record, *args) click to toggle source

Devise sign in is performed through a controller which includes Devise::Controllers::SignInOut

# File lib/simple_token_authentication/sign_in_handler.rb, line 7
def sign_in(controller, record, *args)
  integrate_with_devise_trackable!(controller)

  controller.send(:sign_in, record, *args)
end

Private Instance Methods

integrate_with_devise_trackable!(controller) click to toggle source
# File lib/simple_token_authentication/sign_in_handler.rb, line 15
def integrate_with_devise_trackable!(controller)
  # Sign in using token should not be tracked by Devise trackable
  # See https://github.com/plataformatec/devise/issues/953
  controller.request.env["devise.skip_trackable"] = SimpleTokenAuthentication.skip_devise_trackable
end