Does NodeBB provide support for a user database other than the one it builds in mongo? How would I integrate NodeBB with Keycloak?
-
@julian @PitaJ I'm going to jump into integrating with the OAuth2 based plugin, to integrate with our Keycloak. I'm happy to offer up any learning along the way. Once I get it working then you should have a good test case to point to.
Several questions that leap to mind:
- Can you please point me to how to get started with integration of the OAuth 2 plugin?
- Should I first uninstall my current nodebb development instance (running with mongo) and install clean so that I can be sure to have a clean user database?
- Do you have any documentation on getting started with such a plugin integration?
Thanks for all the help, nodebb has been a fun team and project to work with.
-
I dont see the oauth plugin under Extend/Plugins
According to the documentation here, I could "npm install", however it says this is not recommended.
I've also brought nodebb up in the debugger, to learn more about how its architected, and to get a sense of how plugins are integrated. Given that the interface to Keycloak has not been tested, I wanted to prepare myself to help debugging any Keycloak integration problems that I might have.
Should I clone the plugin project and just point my development nodebb to that cloned area?
-
@David-Sargrad for local development you're probably best off cloning the project repo directly to your disk and using
npm link
(or even a symlink) to add it tonode_modules/
.That should work fine with your debugger.
-
Ah!! @julian Cool. I'll do that. I've never used npm link.. learning something new every day.
Btw.. you guys write clean code.. I really have enjoyed peeking into the codebase.
As an aside, once I npm link, how do I configure nodebb to recognize the OAuth2 plugin?
-
Hi @julian
I've cloned, npm linked, and activated the OAuth2 plugin.I have a user in Keycloak.. I'm not sure where to begin relative to seeing how I might recognize this user in nodebb.
Can you suggest a couple of things I could try to see if I can login to nodebb, using the Keycloak user.
Regards,
Dave -
Hi again.. I just realized that the two client protocols supported by Keycloak are SAML, and OpenID Connect.
Not sure the OAuth2 plugin that you pointed me to aligns with either of these protocols... Thoughts?
-
@David-Sargrad OIDC connect is OAuth2, so yes
There may be differences, but I'm talking in general
The plugin also supports the discovery URL, so just paste the provider domain and the plugin might even auto populated some of the other fields
-
I see.. the plugin settings within the ACL?
-
As an aside, i can set breakpoints in nodebb.. if it helps in verfiying function..
-
Trying to figure out where I can set the provider settings.. Interestingly I see a "Multiple OAuth2" option under Social Authentication. But when I click on it, it doesnt give me options to set.
-
-
One of the screenshots shows Node.js 16 in use and Node.js 18 or 20 is required.
https://community.nodebb.org/topic/17723/nodebb-3-6-0-minimum-nodejs-version -
hmm.. ok.. ty
-
nodebb build now gives me an options menu
-
do i really need to migrate to node 18 or 20.. it seems that things are working
-
ty.. at some point we will absolutely move to 18 or 20.. but im hoping to make progress with 16 for now.