nodebb-plugin-session-sharing(7.2.3) can't make it work on NodeBB v4.4.4
-
nodebb-plugin-sso-auth0 (4.2.0) works fine, I can use auth0 to login with google or github
but now I have a different site running on localhost:4200, I have tab called Forum that open a new tab window going to localhost:4567
built a small node express server to create a cookie.so I login to my site on localhost:4200 via auth0 and it creates a cookie for the session-sharing plugin
res.cookie(CONFIG.nodebb.cookieName, jwtToken, { httpOnly: true, secure: false, // localhost http sameSite: 'lax', // first-party in dev path: '/', // send everywhere maxAge: CONFIG.nodebb.cookieMaxAgeMs, });
Final NodeBB payload: { "id": 951566902, "username": "theddiem", "email": "theddiem@gmail.com", "picture": "https://lh3.googleusercontent.com/a/ACg1ocJLXRjLY5JH5l7gDBBuWLCuboR7n4pEXkXoxyHn9XvAyx8p_7td=s96-c", "firstName": "the", "lastName": "dem", "externalId": "google-oauth2|106089043025998015329" }
than I click on the navbar to open the forum running on localhost:4567, in dev tools I see a cookie there
but I am not logged in automaticly and in the nodebb dev logs I don't see the plugin tries to read the cookiealso if the user is in not registered in the forum at all and used my site to login with auth0 and than go to fourm via navbar link it suppose to register him automiatclly?
Clustering enabled: Spinning up 1 process(es). 2025-07-28T08:31:50.786Z [4567/9188] - verbose: * using configuration stored in: C:\Users\User\Desktop\nodebb\config.json 2025-07-28T08:31:50.800Z [4567/9188] - info: Initializing NodeBB v4.4.4 http://localhost:4567 2025-07-28T08:31:50.801Z [4567/9188] - verbose: * using mongo store at 127.0.0.1:27017 2025-07-28T08:31:50.804Z [4567/9188] - verbose: * using themes stored in: C:\Users\User\Desktop\nodebb\node_modules 2025-07-28T08:32:00.439Z [4567/9188] - verbose: [minifier] utilizing a maximum of 7 additional threads 2025-07-28T08:32:01.486Z [4567/9188] - verbose: Checking dependencies for outdated modules 2025-07-28T08:32:05.682Z [4567/9188] - verbose: [notifications.init] Registering jobs. 2025-07-28T08:32:05.685Z [4567/9188] - verbose: [user/jobs] (Re-)starting jobs... 2025-07-28T08:32:05.687Z [4567/9188] - verbose: [user/jobs] Starting job (digest.daily) 2025-07-28T08:32:05.689Z [4567/9188] - verbose: [user/jobs] Starting job (digest.weekly) 2025-07-28T08:32:05.693Z [4567/9188] - verbose: [user/jobs] Starting job (digest.monthly) 2025-07-28T08:32:05.695Z [4567/9188] - verbose: [user/jobs] Starting job (reset.clean) 2025-07-28T08:32:05.695Z [4567/9188] - verbose: [user/jobs] jobs started 2025-07-28T08:32:05.699Z [4567/9188] - verbose: [scheduled topics] Starting jobs. 2025-07-28T08:32:05.703Z [4567/9188] - verbose: [activitypub/jobs] Registering jobs. 2025-07-28T08:32:05.719Z [4567/9188] - verbose: [emailer] Setting up fallback transport 2025-07-28T08:32:05.954Z [4567/9188] - info: [themes] Using theme nodebb-theme-harmony 2025-07-28T08:32:05.955Z [4567/9188] - verbose: [plugins] Initializing plugins system 2025-07-28T08:32:06.008Z [4567/9188] - verbose: [plugins] Found 1 scss file(s) for plugin nodebb-plugin-composer-default 2025-07-28T08:32:06.019Z [4567/9188] - verbose: [plugins] Found 13 AMD-style module(s) for plugin nodebb-plugin-composer-default 2025-07-28T08:32:06.021Z [4567/9188] - verbose: [plugins] Found 2 js file(s) for plugin nodebb-plugin-composer-default 2025-07-28T08:32:06.023Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-composer-default 2025-07-28T08:32:06.043Z [4567/9188] - verbose: [plugins] found 2 static directories for nodebb-theme-harmony 2025-07-28T08:32:06.045Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-theme-harmony 2025-07-28T08:32:06.047Z [4567/9188] - verbose: [plugins] Found 2 AMD-style module(s) for plugin nodebb-theme-harmony 2025-07-28T08:32:06.050Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-theme-harmony 2025-07-28T08:32:06.133Z [4567/9188] - verbose: [plugins] Found 1 scss file(s) for plugin nodebb-plugin-markdown 2025-07-28T08:32:06.140Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-markdown 2025-07-28T08:32:06.141Z [4567/9188] - verbose: [plugins] Found 2 AMD-style module(s) for plugin nodebb-plugin-markdown 2025-07-28T08:32:06.144Z [4567/9188] - verbose: [plugins] found 1 static directories for nodebb-plugin-markdown 2025-07-28T08:32:06.146Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-markdown 2025-07-28T08:32:06.212Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-mentions 2025-07-28T08:32:06.213Z [4567/9188] - verbose: [plugins] Found 1 AMD-style module(s) for plugin nodebb-plugin-mentions 2025-07-28T08:32:06.243Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-mentions 2025-07-28T08:32:06.480Z [4567/9188] - verbose: [plugins] found 1 static directories for nodebb-plugin-web-push 2025-07-28T08:32:06.482Z [4567/9188] - verbose: [plugins] Found 2 AMD-style module(s) for plugin nodebb-plugin-web-push 2025-07-28T08:32:06.492Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-web-push 2025-07-28T08:32:06.514Z [4567/9188] - verbose: [plugins] Found 1 css file(s) for plugin nodebb-widget-essentials 2025-07-28T08:32:06.515Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-widget-essentials 2025-07-28T08:32:06.545Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-rewards-essentials 2025-07-28T08:32:07.115Z [4567/9188] - verbose: [plugins] Found 1 scss file(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.115Z [4567/9188] - verbose: [plugins] Found 1 acpScss file(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.124Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.125Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.127Z [4567/9188] - verbose: [plugins] found 1 static directories for nodebb-plugin-emoji 2025-07-28T08:32:07.128Z [4567/9188] - verbose: [plugins] Found 5 AMD-style module(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.162Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-emoji 2025-07-28T08:32:07.197Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-emoji-android 2025-07-28T08:32:07.317Z [4567/9188] - verbose: [plugins] Found 1 AMD-style module(s) for plugin nodebb-plugin-session-sharing 2025-07-28T08:32:07.318Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-session-sharing 2025-07-28T08:32:07.320Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-session-sharing 2025-07-28T08:32:07.770Z [4567/9188] - verbose: [plugins] Found 1 AMD-style module(s) for plugin nodebb-plugin-sso-auth0 2025-07-28T08:32:07.770Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-auth0 2025-07-28T08:32:07.776Z [4567/9188] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it. * nodebb-plugin-emoji-android 2025-07-28T08:32:07.782Z [4567/9188] - info: [plugins] Plugins OK 2025-07-28T08:32:07.872Z [4567/9188] - info: [plugins/web-push] VAPID keys OK. 2025-07-28T08:32:07.874Z [4567/9188] - error: [plugins] Error executing 'static:app.load' in plugin 'nodebb-plugin-web-push' Error: Vapid subject is not an https: or mailto: URL. http://localhost:4567 at Object.validateSubject (C:\Users\User\Desktop\nodebb\node_modules\web-push\src\vapid-helper.js:85:11) at WebPushLib.setVapidDetails (C:\Users\User\Desktop\nodebb\node_modules\web-push\src\web-push-lib.js:59:17) at assertVapidConfiguration (C:\Users\User\Desktop\nodebb\node_modules\nodebb-plugin-web-push\library.js:64:10) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async plugin.init [as method] (C:\Users\User\Desktop\nodebb\node_modules\nodebb-plugin-web-push\library.js:32:2) at async Object.fireStaticHook [as static] (C:\Users\User\Desktop\nodebb\src\plugins\hooks.js:238:4) at async Hooks.fire (C:\Users\User\Desktop\nodebb\src\plugins\hooks.js:106:17) at async Plugins.reloadRoutes (C:\Users\User\Desktop\nodebb\src\plugins\index.js:150:2) at async module.exports (C:\Users\User\Desktop\nodebb\src\routes\index.js:146:2) at async initializeNodeBB (C:\Users\User\Desktop\nodebb\src\webserver.js:113:2) 2025-07-28T08:32:07.896Z [4567/9188] - info: [session-sharing] Settings OK 2025-07-28T08:32:07.898Z [4567/9188] - warn: [helpers.setupPageRoute(/deauth/auth0)] passing `middleware` as the third param is deprecated, it can now be safely removed 2025-07-28T08:32:07.899Z [4567/9188] - verbose: [plugins] All plugins reloaded and rerouted 2025-07-28T08:32:07.999Z [4567/9188] - info: [api] Adding 3 route(s) to `api/v3/plugins` 2025-07-28T08:32:08.025Z [4567/9188] - info: [router] Routes added 2025-07-28T08:32:08.030Z [4567/9188] - verbose: [meta/blacklist] Loading 0 blacklist rule(s) 2025-07-28T08:32:08.046Z [4567/9188] - info: 🎉 NodeBB Ready 2025-07-28T08:32:08.048Z [4567/9188] - info: 🤝 Enabling 'trust proxy' 2025-07-28T08:32:08.061Z [4567/9188] - info: 📡 NodeBB is now listening on: 0.0.0.0:4567 2025-07-28T08:32:08.062Z [4567/9188] - info: 🔗 Canonical URL: http://localhost:4567
-
nodebb-plugin-sso-auth0 (4.2.0) works fine, I can use auth0 to login with google or github
but now I have a different site running on localhost:4200, I have tab called Forum that open a new tab window going to localhost:4567
built a small node express server to create a cookie.so I login to my site on localhost:4200 via auth0 and it creates a cookie for the session-sharing plugin
res.cookie(CONFIG.nodebb.cookieName, jwtToken, { httpOnly: true, secure: false, // localhost http sameSite: 'lax', // first-party in dev path: '/', // send everywhere maxAge: CONFIG.nodebb.cookieMaxAgeMs, });
Final NodeBB payload: { "id": 951566902, "username": "theddiem", "email": "theddiem@gmail.com", "picture": "https://lh3.googleusercontent.com/a/ACg1ocJLXRjLY5JH5l7gDBBuWLCuboR7n4pEXkXoxyHn9XvAyx8p_7td=s96-c", "firstName": "the", "lastName": "dem", "externalId": "google-oauth2|106089043025998015329" }
than I click on the navbar to open the forum running on localhost:4567, in dev tools I see a cookie there
but I am not logged in automaticly and in the nodebb dev logs I don't see the plugin tries to read the cookiealso if the user is in not registered in the forum at all and used my site to login with auth0 and than go to fourm via navbar link it suppose to register him automiatclly?
Clustering enabled: Spinning up 1 process(es). 2025-07-28T08:31:50.786Z [4567/9188] - verbose: * using configuration stored in: C:\Users\User\Desktop\nodebb\config.json 2025-07-28T08:31:50.800Z [4567/9188] - info: Initializing NodeBB v4.4.4 http://localhost:4567 2025-07-28T08:31:50.801Z [4567/9188] - verbose: * using mongo store at 127.0.0.1:27017 2025-07-28T08:31:50.804Z [4567/9188] - verbose: * using themes stored in: C:\Users\User\Desktop\nodebb\node_modules 2025-07-28T08:32:00.439Z [4567/9188] - verbose: [minifier] utilizing a maximum of 7 additional threads 2025-07-28T08:32:01.486Z [4567/9188] - verbose: Checking dependencies for outdated modules 2025-07-28T08:32:05.682Z [4567/9188] - verbose: [notifications.init] Registering jobs. 2025-07-28T08:32:05.685Z [4567/9188] - verbose: [user/jobs] (Re-)starting jobs... 2025-07-28T08:32:05.687Z [4567/9188] - verbose: [user/jobs] Starting job (digest.daily) 2025-07-28T08:32:05.689Z [4567/9188] - verbose: [user/jobs] Starting job (digest.weekly) 2025-07-28T08:32:05.693Z [4567/9188] - verbose: [user/jobs] Starting job (digest.monthly) 2025-07-28T08:32:05.695Z [4567/9188] - verbose: [user/jobs] Starting job (reset.clean) 2025-07-28T08:32:05.695Z [4567/9188] - verbose: [user/jobs] jobs started 2025-07-28T08:32:05.699Z [4567/9188] - verbose: [scheduled topics] Starting jobs. 2025-07-28T08:32:05.703Z [4567/9188] - verbose: [activitypub/jobs] Registering jobs. 2025-07-28T08:32:05.719Z [4567/9188] - verbose: [emailer] Setting up fallback transport 2025-07-28T08:32:05.954Z [4567/9188] - info: [themes] Using theme nodebb-theme-harmony 2025-07-28T08:32:05.955Z [4567/9188] - verbose: [plugins] Initializing plugins system 2025-07-28T08:32:06.008Z [4567/9188] - verbose: [plugins] Found 1 scss file(s) for plugin nodebb-plugin-composer-default 2025-07-28T08:32:06.019Z [4567/9188] - verbose: [plugins] Found 13 AMD-style module(s) for plugin nodebb-plugin-composer-default 2025-07-28T08:32:06.021Z [4567/9188] - verbose: [plugins] Found 2 js file(s) for plugin nodebb-plugin-composer-default 2025-07-28T08:32:06.023Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-composer-default 2025-07-28T08:32:06.043Z [4567/9188] - verbose: [plugins] found 2 static directories for nodebb-theme-harmony 2025-07-28T08:32:06.045Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-theme-harmony 2025-07-28T08:32:06.047Z [4567/9188] - verbose: [plugins] Found 2 AMD-style module(s) for plugin nodebb-theme-harmony 2025-07-28T08:32:06.050Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-theme-harmony 2025-07-28T08:32:06.133Z [4567/9188] - verbose: [plugins] Found 1 scss file(s) for plugin nodebb-plugin-markdown 2025-07-28T08:32:06.140Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-markdown 2025-07-28T08:32:06.141Z [4567/9188] - verbose: [plugins] Found 2 AMD-style module(s) for plugin nodebb-plugin-markdown 2025-07-28T08:32:06.144Z [4567/9188] - verbose: [plugins] found 1 static directories for nodebb-plugin-markdown 2025-07-28T08:32:06.146Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-markdown 2025-07-28T08:32:06.212Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-mentions 2025-07-28T08:32:06.213Z [4567/9188] - verbose: [plugins] Found 1 AMD-style module(s) for plugin nodebb-plugin-mentions 2025-07-28T08:32:06.243Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-mentions 2025-07-28T08:32:06.480Z [4567/9188] - verbose: [plugins] found 1 static directories for nodebb-plugin-web-push 2025-07-28T08:32:06.482Z [4567/9188] - verbose: [plugins] Found 2 AMD-style module(s) for plugin nodebb-plugin-web-push 2025-07-28T08:32:06.492Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-web-push 2025-07-28T08:32:06.514Z [4567/9188] - verbose: [plugins] Found 1 css file(s) for plugin nodebb-widget-essentials 2025-07-28T08:32:06.515Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-widget-essentials 2025-07-28T08:32:06.545Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-rewards-essentials 2025-07-28T08:32:07.115Z [4567/9188] - verbose: [plugins] Found 1 scss file(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.115Z [4567/9188] - verbose: [plugins] Found 1 acpScss file(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.124Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.125Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.127Z [4567/9188] - verbose: [plugins] found 1 static directories for nodebb-plugin-emoji 2025-07-28T08:32:07.128Z [4567/9188] - verbose: [plugins] Found 5 AMD-style module(s) for plugin nodebb-plugin-emoji 2025-07-28T08:32:07.162Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-emoji 2025-07-28T08:32:07.197Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-emoji-android 2025-07-28T08:32:07.317Z [4567/9188] - verbose: [plugins] Found 1 AMD-style module(s) for plugin nodebb-plugin-session-sharing 2025-07-28T08:32:07.318Z [4567/9188] - verbose: [plugins] Found 1 js file(s) for plugin nodebb-plugin-session-sharing 2025-07-28T08:32:07.320Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-session-sharing 2025-07-28T08:32:07.770Z [4567/9188] - verbose: [plugins] Found 1 AMD-style module(s) for plugin nodebb-plugin-sso-auth0 2025-07-28T08:32:07.770Z [4567/9188] - verbose: [plugins] Loaded plugin: nodebb-plugin-sso-auth0 2025-07-28T08:32:07.776Z [4567/9188] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it. * nodebb-plugin-emoji-android 2025-07-28T08:32:07.782Z [4567/9188] - info: [plugins] Plugins OK 2025-07-28T08:32:07.872Z [4567/9188] - info: [plugins/web-push] VAPID keys OK. 2025-07-28T08:32:07.874Z [4567/9188] - error: [plugins] Error executing 'static:app.load' in plugin 'nodebb-plugin-web-push' Error: Vapid subject is not an https: or mailto: URL. http://localhost:4567 at Object.validateSubject (C:\Users\User\Desktop\nodebb\node_modules\web-push\src\vapid-helper.js:85:11) at WebPushLib.setVapidDetails (C:\Users\User\Desktop\nodebb\node_modules\web-push\src\web-push-lib.js:59:17) at assertVapidConfiguration (C:\Users\User\Desktop\nodebb\node_modules\nodebb-plugin-web-push\library.js:64:10) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async plugin.init [as method] (C:\Users\User\Desktop\nodebb\node_modules\nodebb-plugin-web-push\library.js:32:2) at async Object.fireStaticHook [as static] (C:\Users\User\Desktop\nodebb\src\plugins\hooks.js:238:4) at async Hooks.fire (C:\Users\User\Desktop\nodebb\src\plugins\hooks.js:106:17) at async Plugins.reloadRoutes (C:\Users\User\Desktop\nodebb\src\plugins\index.js:150:2) at async module.exports (C:\Users\User\Desktop\nodebb\src\routes\index.js:146:2) at async initializeNodeBB (C:\Users\User\Desktop\nodebb\src\webserver.js:113:2) 2025-07-28T08:32:07.896Z [4567/9188] - info: [session-sharing] Settings OK 2025-07-28T08:32:07.898Z [4567/9188] - warn: [helpers.setupPageRoute(/deauth/auth0)] passing `middleware` as the third param is deprecated, it can now be safely removed 2025-07-28T08:32:07.899Z [4567/9188] - verbose: [plugins] All plugins reloaded and rerouted 2025-07-28T08:32:07.999Z [4567/9188] - info: [api] Adding 3 route(s) to `api/v3/plugins` 2025-07-28T08:32:08.025Z [4567/9188] - info: [router] Routes added 2025-07-28T08:32:08.030Z [4567/9188] - verbose: [meta/blacklist] Loading 0 blacklist rule(s) 2025-07-28T08:32:08.046Z [4567/9188] - info: 🎉 NodeBB Ready 2025-07-28T08:32:08.048Z [4567/9188] - info: 🤝 Enabling 'trust proxy' 2025-07-28T08:32:08.061Z [4567/9188] - info: 📡 NodeBB is now listening on: 0.0.0.0:4567 2025-07-28T08:32:08.062Z [4567/9188] - info: 🔗 Canonical URL: http://localhost:4567
Sounds like you figured it out in the other topic