Commit 3aef807f authored by Jonne Haß's avatar Jonne Haß

Merge pull request #3693 from jaywink/feature/3283-empty-page-after-service-callback

Fix empty page after callback from service by redirecting to origin
parents 441c937b b96fbb06
......@@ -30,6 +30,7 @@
* Fix error with open/close registrations. [#3649](https://github.com/diaspora/diaspora/pull/3649)
* Fix javascripts error in invitations facebox. [#3638](https://github.com/diaspora/diaspora/pull/3638)
* Fix css overflow problem in aspect dropdown on welcome page. [#3637](https://github.com/diaspora/diaspora/pull/3637)
* Fix empty page after authenticating with other services. [#3693](https://github.com/diaspora/diaspora/pull/3693)
# 0.0.1.2
......
......@@ -48,8 +48,12 @@ class ServicesController < ApplicationController
:service_name => provider.camelize )
end
end
render :text => ("<script>window.close()</script>")
if request.env['omniauth.origin'].nil?
render :text => ("<script>window.close()</script>")
else
redirect_to request.env['omniauth.origin']
end
end
def failure
......
......@@ -16,4 +16,4 @@
- AppConfig.configured_services.each do |service|
- unless @services.any?{|x| x.provider == service}
%h4= link_to t("services.index.connect_to_#{service}"), "#", :onclick => "window.open('/auth/#{service}', 'popup', 'height=400,width=500')"
%h4= link_to(t("services.index.connect_to_#{service}"), "/auth/#{service}")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment