Permalink
Browse files

fix to work redirect_back_or_to when with externals

  • Loading branch information...
1 parent 0ecc67f commit 1a6691fa251ea2fd2a218fcac5f49fb316f451d7 @banyan committed Apr 21, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/sorcery/controller/submodules/external.rb
@@ -46,7 +46,9 @@ def login_from(provider)
@provider.process_callback(params,session)
@user_hash = @provider.get_user_hash
if user = user_class.load_from_provider(provider,@user_hash[:uid].to_s)
+ return_to_url = session[:return_to_url]
reset_session
+ session[:return_to_url] = return_to_url
auto_login(user)
user
end

0 comments on commit 1a6691f

Please sign in to comment.