feat(xo-server-auth-{github,google,saml}): reload on configure (#4864)
Fixes #4863 Otherwise, the new configuration is not taken into account.
This commit is contained in:
@@ -54,7 +54,7 @@ class AuthSamlXoPlugin {
|
||||
this._xo = xo
|
||||
}
|
||||
|
||||
configure({ usernameField, ...conf }) {
|
||||
async configure({ usernameField, ...conf }, { loaded }) {
|
||||
this._usernameField = usernameField
|
||||
this._conf = {
|
||||
...DEFAULTS,
|
||||
@@ -63,6 +63,11 @@ class AuthSamlXoPlugin {
|
||||
// must match the callback URL
|
||||
path: '/signin/saml/callback',
|
||||
}
|
||||
|
||||
if (loaded) {
|
||||
await this.unload()
|
||||
await this.load()
|
||||
}
|
||||
}
|
||||
|
||||
load() {
|
||||
|
||||
Reference in New Issue
Block a user