mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:43:15 +08:00
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.external_id = current_user.id.to_s
|
||||||
sso.admin = current_user.admin?
|
sso.admin = current_user.admin?
|
||||||
sso.moderator = current_user.moderator?
|
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?
|
if request.xhr?
|
||||||
cookies[:sso_destination_url] = sso.to_url(sso.return_sso_url)
|
cookies[:sso_destination_url] = sso.to_url(sso.return_sso_url)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user