Sha256: 054bc9a5b835fd09ad27f351ff1f9ef9bebb2febd11a632e09b3deea3847336b

Contents?: true

Size: 483 Bytes

Versions: 9

Compression:

Stored size: 483 Bytes

Contents

class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
  def facebook
    data = request.respond_to?(:get_header) ? request.get_header("omniauth.auth") : env["omniauth.auth"]
    session["devise.facebook_data"] = data["extra"]["user_hash"]
    render json: data
  end

  def sign_in_facebook
    user = User.to_adapter.find_first(email: 'user@test.com')
    user.remember_me = true
    sign_in user
    render (Devise.rails5? ? :body : :text) => ""
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
devise-4.0.3 test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
devise-4.1.1 test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
devise-4.1.0 test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
devise-4.0.2 test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
devise-4.0.1 test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
devise-4.0.0 test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
devise-4.0.0.rc2 test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb
devise-4.0.0.rc1 test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb