NodeBB Blog Comments

NodeBB Plugins

Suggested Topics


  • 0 Votes
    13 Posts
    968 Views

    @baris I'm on nodebb-plugin-friends 1.2.0, latest master and unfortunately, it doesn't 😞

  • 0 Votes
    4 Posts
    2k Views

    No worries, they won't cause any issues.

  • 0 Votes
    1 Posts
    969 Views

    I am new to NodeBB and nodebb-plugin-sso-oauth authenticates users from oauth2-server-php with an Active Directory (Samba 4) backend. "So far so good" - this plug in obviously works in that configuration, but I was not able to include more than id, displayName and email from OAuth into user NodeBB account. My OAuth solution offers a big JSON object with many data which are usable for NodeBB.

    My library.js was patched to

    OAuth.parseUserReturn = function(data, callback) { // Alter this section to include whatever data is necessary // NodeBB *requires* the following: id, displayName, emails. // Everything else is optional. // Find out what is available by uncommenting this line: console.log(data); var profile = {}; profile.id = data.id; profile.displayName = data.display_name; profile.fullname = data.user_nicename; profile.emails = data.emails; console.log(profile); // Do you want to automatically make somebody an admin? This line might help you do that... // profile.isAdmin = data.isAdmin ? true : false; // Delete or comment out the next TWO (2) lines when you are ready to proceed //process.stdout.write('===\nAt this point, you\'ll need to customise the above section to id, displayName, and emails into the "profile" object.\n==='); //return callback(new Error('Congrats! So far so good -- please see server log for details')); callback(null, profile); }

    this console log show all data as expected, so oauth module got everything, but profile.fullname is ignored by NodBB. It seems it is not enough to patch that section to get more than minimum required data for a NodeBB user.

    Any hints?

  • 5 Votes
    6 Posts
    4k Views

    Thanks for the work, i really like it.

  • 2 Votes
    5 Posts
    2k Views

    @baris said:

    I'm guessing the party you are at is really dull since you are here trolling my posts (rofl)

    the "party" I was at was so dull that I'm still sober and back to working on NodeBB at 1am

    p.s. you should ditch the cats and keep the avatar you have in that screenshot, we miss the baris who used to have hair 😄