julianlam / nodebb-plugin-session-sharing

Allows login sessions from your app to persist in NodeBB
MIT License
88 stars 65 forks source link

JWT secret not found #83

Closed patsanch closed 4 years ago

patsanch commented 4 years ago

Hi,

2019-09-18T23:22:31.075Z [27364] - error: [session-sharing] JWT Secret not found, session sharing disabled.

// if (!settings.hasOwnProperty("secret") || !settings.secret.length) {
//   winston.error(
//     "[session-sharing] JWT Secret not found, session sharing disabled."
//   );
//  return callback();
// }

// This is my current workaround.
if (!plugin.settings.secret.length) {
  winston.error(
    "[session-sharing] JWT Secret not found, session sharing disabled."
  );
  return callback();
}

Any idea why it's failing to find secret? I did update the secret here: https://github.com/julianlam/nodebb-plugin-session-sharing/blob/master/library.js#L50

Thanks!

julianlam commented 4 years ago

You are not to put the secret into the file. Everything is to be configured in the admin page. Reset the file back to the version from the repository, run ./nodebb build, restart NodeBB, and you should be able to specify secret, etc. from the ACP.

patsanch commented 4 years ago

Gotcha, thanks!