Fix empty page after callback from service by redirecting to origin. Also make settings/services page use the same window when authenticating with other services instead of launching a popup.

This commit is contained in:
Jason Robinson 2012-10-30 23:09:24 +02:00
parent 441c937ba6
commit b96fbb0676
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}")