Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment