Sha256: 1dc7cf908560d4dc319af8f44a35a7630c3ea20b3fcca0bc6130241115e5dfa4

Contents?: true

Size: 372 Bytes

Versions: 23

Compression:

Stored size: 372 Bytes

Contents

class OmniauthCallbacksController < Devise::OmniauthCallbacksController
  PROVIDERS = Devise.omniauth_providers

  PROVIDERS.each do |provider|
    define_method(provider) do
      @user = User.find_or_create_for_oauth(env['omniauth.auth'], current_user)

      if @user.persisted?
        sign_in_and_redirect @user, :event => :authentication
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
social_stream-2.2.2 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.2.2 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.2.1 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.2.1 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.2.0 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.2.0 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.1.1 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-2.1.0 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.1.0 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.0.4 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.0.4 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.0.3 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.0.3 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.0.2 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.0.2 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.0.1 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.0.1 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.0.0 base/app/controllers/omniauth_callbacks_controller.rb
social_stream-base-2.0.0 app/controllers/omniauth_callbacks_controller.rb
social_stream-2.0.0.beta3 base/app/controllers/omniauth_callbacks_controller.rb