From df5ab361e30fae36cba8b4dd2b419a0911746b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcell=20F=C3=BCl=C3=B6p?= Date: Fri, 24 Feb 2023 22:27:27 +0000 Subject: [PATCH] chore: update comments, remove debug logging --- backend/routes/api/oidc.js | 20 +++++--------------- frontend/js/login/ui/login.js | 4 ---- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/backend/routes/api/oidc.js b/backend/routes/api/oidc.js index 6fd87c70..58d2c062 100644 --- a/backend/routes/api/oidc.js +++ b/backend/routes/api/oidc.js @@ -12,11 +12,6 @@ let router = express.Router({ mergeParams: true }); -/** - * OAuth Authorization Code flow initialisation - * - * /api/oidc - */ router .route('/') .options((req, res) => { @@ -25,9 +20,9 @@ router .all(jwtdecode()) /** - * GET /api/users + * GET /api/oidc * - * Retrieve all users + * OAuth Authorization Code flow initialisation */ .get(jwtdecode(), async (req, res) => { console.log('oidc: init flow'); @@ -41,11 +36,6 @@ router }); -/** - * Oauth Authorization Code flow callback - * - * /api/oidc/callback - */ router .route('/callback') .options((req, res) => { @@ -54,9 +44,9 @@ router .all(jwtdecode()) /** - * GET /users/123 or /users/me + * GET /api/oidc/callback * - * Retrieve a specific user + * Oauth Authorization Code flow callback */ .get(jwtdecode(), async (req, res) => { console.log('oidc: callback'); @@ -70,7 +60,7 @@ router }); /** - * Executed discovery and returns the configured `openid-client` client + * Executes discovery and returns the configured `openid-client` client * * @param {Setting} row * */ diff --git a/frontend/js/login/ui/login.js b/frontend/js/login/ui/login.js index dc5605d8..0c1c25c6 100644 --- a/frontend/js/login/ui/login.js +++ b/frontend/js/login/ui/login.js @@ -60,22 +60,18 @@ module.exports = Mn.View.extend({ expiry = v[1]; } if (name === 'npm_oidc_error') { - console.log(' ERROR 000 > ', value); error = decodeURIComponent(value); } } - console.log('login.js event > render', expiry, token); // register a newly acquired jwt token following successful oidc authentication if (token && expiry && (new Date(Date.parse(decodeURIComponent(expiry)))) > new Date() ) { - console.log('login.js event > render >>>'); Tokens.addToken(token); document.location.replace('/'); } // show error message following a failed oidc authentication if (error) { - console.log(' ERROR > ', error); this.ui.oidcError.html(error); }