Sha256: 892c765b308b5841c6f6496d5a9ec0c7de02b435e42d6beb7ebdcf2d211bac92

Contents?: true

Size: 449 Bytes

Versions: 4

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true
module Omniauth
  module Rails
    module ApplicationHelper
      delegate :authenticated?, to: :authentication_session

      def authenticated_email
        if authenticated?
          authentication_session.email
        elsif Configuration.dev_mode
          "[not logged in - dev mode]"
        end
      end

      def authentication_session
        AuthenticationSession.new(session)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
omniauth-rails-0.6.0 app/helpers/omniauth/rails/application_helper.rb
omniauth-rails-0.5.0 app/helpers/omniauth/rails/application_helper.rb
omniauth-rails-0.4.0 app/helpers/omniauth/rails/application_helper.rb
omniauth-rails-0.3.0 app/helpers/omniauth/rails/application_helper.rb