nodebb-plugin-session-sharing 8.0.3 → 8.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/library.js +5 -0
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -458,6 +458,11 @@ plugin.addMiddleware = async function ({ req, res }) {
458
458
  const wasForceLogin = !!req.session.forceLogin;
459
459
  delete req.session.forceLogin;
460
460
  await nbbAuthController.onSuccessfulLogin(req, uid, true, wasForceLogin);
461
+ if (wasForceLogin && req.session.returnTo) {
462
+ const url = req.session.returnTo;
463
+ delete req.session.returnTo;
464
+ res.redirect(nconf.get('relative_path') + url);
465
+ }
461
466
  return;
462
467
  }
463
468
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-session-sharing",
3
- "version": "8.0.3",
3
+ "version": "8.0.4",
4
4
  "description": "Allows login sessions from your app to persist in NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {