Sha256: fad626e5bb1b94905df00351c9e8a921376a7f73b2117512b30473339d71b79b

Contents?: true

Size: 415 Bytes

Versions: 4

Compression:

Stored size: 415 Bytes

Contents

module RailsSso
  class SessionsController < RailsSso.application_controller.constantize
    skip_before_action :authenticate_user!, only: [:create]

    def create
      sign_in_with_access_token!(auth_hash.credentials)

      redirect_to root_path
    end

    def destroy
      sign_out!

      redirect_to root_path
    end

    protected

    def auth_hash
      request.env['omniauth.auth']
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_sso-0.6.1 app/controllers/rails_sso/sessions_controller.rb
rails_sso-0.6.0 app/controllers/rails_sso/sessions_controller.rb
rails_sso-0.5.0 app/controllers/rails_sso/sessions_controller.rb
rails_sso-0.4.0 app/controllers/rails_sso/sessions_controller.rb