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:
commit
3aef807f78
3 changed files with 8 additions and 3 deletions
|
|
@ -30,6 +30,7 @@
|
||||||
* Fix error with open/close registrations. [#3649](https://github.com/diaspora/diaspora/pull/3649)
|
* 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 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 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
|
# 0.0.1.2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,11 @@ class ServicesController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if request.env['omniauth.origin'].nil?
|
||||||
render :text => ("<script>window.close()</script>")
|
render :text => ("<script>window.close()</script>")
|
||||||
|
else
|
||||||
|
redirect_to request.env['omniauth.origin']
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def failure
|
def failure
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@
|
||||||
|
|
||||||
- AppConfig.configured_services.each do |service|
|
- AppConfig.configured_services.each do |service|
|
||||||
- unless @services.any?{|x| x.provider == 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}")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue