Skip to content

Commit

Permalink
Made a few more changes to get omniauth/openid working. It seems to work
Browse files Browse the repository at this point in the history
now for connecting to a local account that already exists.
  • Loading branch information
Howard A. Ding committed May 20, 2011
1 parent 7170b43 commit f58a8bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/authentications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def create
user.apply_omniauth(omniauth)
user.save
flash[:info] = 'Authentication successful.'
redirect_to home_url
redirect_to root_url
else
# User is new to this application
user = User.new
Expand All @@ -41,9 +41,9 @@ def destroy
private
def sign_in_and_redirect(user)
unless current_user
user_session = UserSession.new(User.find_by_single_access_token(user.single_access_token))
user_session = UserSession.new(user)
user_session.save
end
redirect_to home_path
redirect_to root_url
end
end

0 comments on commit f58a8bd

Please sign in to comment.