diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-19 01:57:11 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-19 01:57:11 +0300 |
commit | 19163f84fbec0e1798300c62745d1f747259eb61 (patch) | |
tree | d2e22200742dba6783dd906a432e2e2edfe5de2f /config | |
parent | 2940263aacb869ef3cd062b23a18b7eaf64dd443 (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.rb | 3 |
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 |