From f988c5f8116258735fc058551beb6a11f94cc900 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Wed, 9 Sep 2020 20:20:55 -0400 Subject: [PATCH] fix: logout URL endpoint option for oauth2 module --- server/modules/authentication/oidc/authentication.js | 7 +++++++ server/modules/authentication/oidc/definition.yml | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/server/modules/authentication/oidc/authentication.js b/server/modules/authentication/oidc/authentication.js index d7034973..c07f4cbe 100644 --- a/server/modules/authentication/oidc/authentication.js +++ b/server/modules/authentication/oidc/authentication.js @@ -35,5 +35,12 @@ module.exports = { } }) ) + }, + logout (conf) { + if (!conf.logoutURL) { + return '/' + } else { + return conf.logoutURL + } } } diff --git a/server/modules/authentication/oidc/definition.yml b/server/modules/authentication/oidc/definition.yml index dcbf9fce..02812c4f 100644 --- a/server/modules/authentication/oidc/definition.yml +++ b/server/modules/authentication/oidc/definition.yml @@ -49,3 +49,8 @@ props: default: email maxWidth: 500 order: 7 + logoutURL: + type: String + title: Logout URL + hint: (optional) Logout URL on the OAuth2 provider where the user will be redirected to complete the logout process. + order: 8