Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-07-19 01:57:11 +0300
committerStan Hu <stanhu@gmail.com>2015-07-19 01:57:11 +0300
commit19163f84fbec0e1798300c62745d1f747259eb61 (patch)
treed2e22200742dba6783dd906a432e2e2edfe5de2f /config
parent2940263aacb869ef3cd062b23a18b7eaf64dd443 (diff)
Fix OAuth provider bug where GitLab would not go return to the redirect_uri after sign-in
Closes #1612
Diffstat (limited to 'config')
-rw-r--r--config/initializers/doorkeeper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index d422acb31d6..6139ddbe6cd 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -6,7 +6,8 @@ Doorkeeper.configure do
# This block will be called to check whether the resource owner is authenticated or not.
resource_owner_authenticator do
# Put your resource owner authentication logic here.
- # Example implementation:
+ # Ensure user is redirected to redirect_uri after login
+ session[:user_return_to] = request.fullpath
current_user || redirect_to(new_user_session_url)
end