Sha256: 59df52106659c65cbcfe9655fc2411041d6c23ff98c440bf8c7197ce821f5933

Contents?: true

Size: 623 Bytes

Versions: 18

Compression:

Stored size: 623 Bytes

Contents

module G5Authenticatable
  class SessionsController < DeviseG5Authenticatable::SessionsController
    protected
    def register_resource
      create_resource
      sign_in_resource
    end

    def signed_in_root_path(resource_or_scope)
      main_app.root_path
    end

    def create_resource
      self.resource = G5Authenticatable::User.new_with_session({}, session)
      resource.update_g5_credentials(auth_data)
      resource.save!
    end

    def after_omniauth_failure_path_for(scope)
      auth_error_path
    end

    def after_sign_out_path_for(resource_or_scope)
      main_app.root_path
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
g5_authenticatable-0.9.1.pre.2 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.8.1.pre app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.8.0 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.8.0.beta1 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.7.5 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.7.5.beta app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.7.4 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.7.4.beta.1 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.7.3 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.7.2 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.7.1 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.7.0 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.6.0 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.5.1 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.5.0 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.4.2 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.4.1 app/controllers/g5_authenticatable/sessions_controller.rb
g5_authenticatable-0.4.0 app/controllers/g5_authenticatable/sessions_controller.rb