I am attempting to use the nodebb-plugin-sso-oauth plugin to implement SSO with CAS into my forum.
My CAS is using Oauth2. I have POST methods with urls for request code (authorization), request access token, and request profile.
I have installed the plugin and set up nconf to use my constants.
I activated the plugin and refreshed my nodebb forum.
It is now crashing upon starting and I get the following error.
24/7 00:37:39  - error: message=Cannot read property 'length' of undefined, stack=TypeError: Cannot read property 'length' of undefined
at pathtoRegexp (/root/nodebb/node_modules/path-to-regexp/index.js:63:49)
at new Layer (/root/nodebb/node_modules/express/lib/router/layer.js:45:17)
at Function.use (/root/nodebb/node_modules/express/lib/router/index.js:464:17)
at Function.<anonymous> (/root/nodebb/node_modules/express/lib/application.js:220:21)
at Array.forEach (<anonymous>)
at Function.use (/root/nodebb/node_modules/express/lib/application.js:217:7)
at module.exports (/root/nodebb/src/routes/index.js:139:7)
at fn (/root/nodebb/node_modules/async/lib/async.js:746:34)
at Immediate._onImmediate (/root/nodebb/node_modules/async/lib/async.js:1206:34)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
My guess is that for some reason, path is being passed as undefined.
I am stuck and in need of help.
Please provide feedback or recommendations for how I can implement CAS Single Sign On into my nodebb forum.
I am using the latest version of the beep plugin 0.4.2 on the latest version of NodeBB 1.12.2. I have one issue with the beep plugin regarding old topics which were created before I migrated my site to NodeBB which have words which should be censored.
Newly created topics are censored with the beep plugin just fine. In the MongoDB the beep plugin actually saves topics with the censored words, so e.g. "title" : "Ps test censor" or "slug" : "123/ps-test-censor" is persisted in the database. Posts are obviously not modified by the beep plugin in the database but on the fly. Queries on the DB show the full non censored words in all posts be it old or new posts. Old and new posts are correctly censored by the beep plugin on the fly during browsing of NodeBB forum.
To fix this, post processing must be run on all topics in mongodb to modify "title" and "slug" applying the current beep censor rules.
Fortunately, I did not have that many topics to fix, so a quick manual fix is to just open each offending topic once, editing the topic as admin and saving it.
As a future improvement of this plugin, it would be very nice to have a simple button in the admin panel which runs a post-processing script for the above issue. This would be especially helpful on any change of the censor words down the line.