I was installing using the guidance available here and ran into difficulties. I'll try again soon when I have time to troubleshoot and provide feedback. It seems the installation isn't as easy as Ghost was for me.
How I can Integrate NodeBB into my website
-
Hello, I have developed a website with user authentication built working passportJS and I am mapping on using NodeBB. How can I merge NodeBB in my website using my own web login system, is it require to get NodeBB services from any web development company (url removed) or I can do it myself easily?
-
You need to use the write api. So install the write api plug in first then make a post request to http://mywebsite.com/api/v1/users with a header that includes an authorization and a token generated after installing write api and the username and password.
This should create the user. To log in you can install the ns-login plug in and it is almost a similar step. I am a little bit stumped though. After logging in or signing up, the user session is not persistent or should I say existent. But I think the above should get you started.
-
Probably a spam user...
-
-
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.
-
This post is deleted!
-
@julian I've successfully integrated the SSO oauth plugin with my website using OAuth2orize. I can log in but i don't know how to log out. Any idea?
-
@julian I have that already. I want it the other way: if the user logs out from my website, log him out from NodeBB. Is it possible?
-
I found out that if i remove the cookie
express.sid
then i'm logged out... But i don't like that workaround. Any other ideas to log out from the outside?