Skip to content

Commit df5ab36

Browse files
committed
chore: update comments, remove debug logging
1 parent 6f98fa6 commit df5ab36

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

backend/routes/api/oidc.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ let router = express.Router({
1212
mergeParams: true
1313
});
1414

15-
/**
16-
* OAuth Authorization Code flow initialisation
17-
*
18-
* /api/oidc
19-
*/
2015
router
2116
.route('/')
2217
.options((req, res) => {
@@ -25,9 +20,9 @@ router
2520
.all(jwtdecode())
2621

2722
/**
28-
* GET /api/users
23+
* GET /api/oidc
2924
*
30-
* Retrieve all users
25+
* OAuth Authorization Code flow initialisation
3126
*/
3227
.get(jwtdecode(), async (req, res) => {
3328
console.log('oidc: init flow');
@@ -41,11 +36,6 @@ router
4136
});
4237

4338

44-
/**
45-
* Oauth Authorization Code flow callback
46-
*
47-
* /api/oidc/callback
48-
*/
4939
router
5040
.route('/callback')
5141
.options((req, res) => {
@@ -54,9 +44,9 @@ router
5444
.all(jwtdecode())
5545

5646
/**
57-
* GET /users/123 or /users/me
47+
* GET /api/oidc/callback
5848
*
59-
* Retrieve a specific user
49+
* Oauth Authorization Code flow callback
6050
*/
6151
.get(jwtdecode(), async (req, res) => {
6252
console.log('oidc: callback');
@@ -70,7 +60,7 @@ router
7060
});
7161

7262
/**
73-
* Executed discovery and returns the configured `openid-client` client
63+
* Executes discovery and returns the configured `openid-client` client
7464
*
7565
* @param {Setting} row
7666
* */

frontend/js/login/ui/login.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,18 @@ module.exports = Mn.View.extend({
6060
expiry = v[1];
6161
}
6262
if (name === 'npm_oidc_error') {
63-
console.log(' ERROR 000 > ', value);
6463
error = decodeURIComponent(value);
6564
}
6665
}
6766

68-
console.log('login.js event > render', expiry, token);
6967
// register a newly acquired jwt token following successful oidc authentication
7068
if (token && expiry && (new Date(Date.parse(decodeURIComponent(expiry)))) > new Date() ) {
71-
console.log('login.js event > render >>>');
7269
Tokens.addToken(token);
7370
document.location.replace('/');
7471
}
7572

7673
// show error message following a failed oidc authentication
7774
if (error) {
78-
console.log(' ERROR > ', error);
7975
this.ui.oidcError.html(error);
8076
}
8177

0 commit comments

Comments
 (0)