FIX: sso provider require return_sso_url

This commit is contained in:
Sam 2017-03-22 09:08:38 -04:00
parent 67eb754c3c
commit 8e5e3b5af8
1 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,12 @@ class SessionController < ApplicationController
sso.external_id = current_user.id.to_s
sso.admin = current_user.admin?
sso.moderator = current_user.moderator?
if sso.return_sso_url.blank?
render text: "return_sso_url is blank, it must be provided", status: 400
return
end
if request.xhr?
cookies[:sso_destination_url] = sso.to_url(sso.return_sso_url)
else