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:
Julien Fontanet
2020-03-12 09:35:51 +01:00
committed by GitHub
parent ec83b76e46
commit ec51cf7606
4 changed files with 22 additions and 3 deletions
+6 -1
View File
@@ -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() {