mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FEATURE: allow for overlapping DiscourseConnect secrets per domain (#16915)
Previously we limited Discourse Connect provider to 1 secret per domain. This made it pretty awkward to cycle secrets in environments where config takes time to propagate This change allows for the same domain to have multiple secrets Also fixes internal implementation on DiscourseConnectProvider which was not thread safe as it leaned on class variables to ferry data around Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com> Co-authored-by: David Taylor <david@taylorhq.com>
This commit is contained in:
@ -79,7 +79,7 @@ class SessionController < ApplicationController
|
||||
end
|
||||
rescue DiscourseConnectProvider::BlankSecret
|
||||
render plain: I18n.t("discourse_connect.missing_secret"), status: 400
|
||||
rescue DiscourseConnectProvider::ParseError => e
|
||||
rescue DiscourseConnectProvider::ParseError
|
||||
# Do NOT pass the error text to the client, it would give them the correct signature
|
||||
render plain: I18n.t("discourse_connect.login_error"), status: 422
|
||||
rescue DiscourseConnectProvider::BlankReturnUrl
|
||||
|
Reference in New Issue
Block a user