aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/sessions_controller.rb
blob: c755c69354f5ebddcc399bedd1415090032263f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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