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

Fix empty page after callback from service by redirecting to origin
This commit is contained in:
Jonne Haß 2012-11-01 13:33:27 -07:00
commit 3aef807f78
3 changed files with 8 additions and 3 deletions

View file

@ -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

View file

@ -49,7 +49,11 @@ class ServicesController < ApplicationController
end
end
if request.env['omniauth.origin'].nil?
render :text => ("<script>window.close()</script>")
else
redirect_to request.env['omniauth.origin']
end
end
def failure

View file

@ -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}")