Authorisation for app on same server as NodeBB

General Discussion

Suggested Topics


  • 0 Votes
    2 Posts
    213 Views

    This could happen if db.setObject is called with an empty object like this db.setObject('someKey', {});.

    Can you put a console log in src/database/mongo/hash.js here. Place the below code and let me know the output.

    if (!Object.keys(data).length) { console.log('empty data', new Error('a').stack); }
  • 0 Votes
    6 Posts
    2k Views

    @meetdilip: Yes, of course it depends on the different sites. It should be an optional, configurable feature. Since it seems to be not yet implemented in NodeBB, I woud like it to be considered a feature suggestion.

    About choosing Discourse or NodeBB, Discourse has already very nice features like this self-moderation. However, for some other points that can be important depending on the site, NodeBB gives more options. For example, Discourse has explicitly discarded pagination as a possible option, therefore infinite scroll must be used in all cases. Also adamantly discarded are hierarchical categories, and only one level of subcategories is allowed in all cases.

    On the other hand, NodeBB seems more open to give options for users' suggestions, such as optional pagination, unlimited subcategory levels, flexible theming, etc. So, this project probably will use NodeBB.

  • NodeBB + Ghost

    General Discussion
    0 Votes
    3 Posts
    1k Views

    The recommended method of sharing sessions between two separate and distinct applications is through OAuth2. We recommend this approach because NodeBB maintains its own user records, so that we can keep track of user-related metrics and other data. Relying on another database would be tricky, prone to breaking, and quite possibly dangerous.

    Luckily, it's quite straightforward to get things working with OAuth2!

    The first step is getting your application to expose an OAuth2 endpoint. If you're running a Node.js based app, you can use a module called OAuth2orize.

    Once that is set up, you'll want to take a look at the SSO plugin skeleton for customised OAuth deployments -- nodebb-plugin-sso-oauth. You'll take this plugin, fork it, and modify it to communicate with your OAuth endpoint.

    Once everything is working properly, you should be able to register and log in/out via your web app.

  • 1 Votes
    2 Posts
    1k Views

    @Jesse-Pulfer You're a new member of the NodeBB Team I guess? Thats cool 👍

  • 0 Votes
    2 Posts
    1k Views

    Cool 🙂 I don't really have any material that's not on this forum already. We did one for the nodejs meet up in Toronto two years ago, but that's when we were just starting up and I'm pretty sure whatever I was talking about is either now outdated or simply BS 😛