FIX: sso provider require return_sso_url
This commit is contained in:
parent
67eb754c3c
commit
8e5e3b5af8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue