Sha256: c5a02aebf90fe10d9b6f9bd3d485b3ac720c1255307c00e26c9e42e256ba4b2a

Contents?: true

Size: 249 Bytes

Versions: 2

Compression:

Stored size: 249 Bytes

Contents

class SessionsController < ApplicationController
  def create
    @user = User.find_or_create_from_auth_hash(auth_hash)
    self.current_user = @user
    redirect_to '/'
  end

  protected

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bently-1.0.2 lib/bently/template/omniauth/sessions_controller.rb
bently-1.0.1 lib/bently/template/omniauth/sessions_controller.rb