I want to use nodeBB in my Website. Please help me.



  • hello, I'm student.
    I want to use nodeBB in my website.

    but, My website using session login, so I want,
    when I register in website, I also register to nodeBB.

    Can I do this? or Do you have anything solution?
    (I have to use session login..T__T)


  • GNU/Linux Admin

    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.


    Alternative would be using nodebb-plugin-session-sharing, the instructions for that are in the readme.



  • @julian Thank you for reply,
    Can you explain to me about “oAuth2 end point”?


  • GNU/Linux Admin

    Unfortunately explaining the theory behind OAuth is beyond the scope of this forum, so I would recommend you do some additional research into why OAuth is used, and how it is implemented 😄



  • @julian Thanks!

    umm.. I did insert data menually in database.
    like this,
    db.objects.insert({
    ... "_key" : "user:6",
    ... "username" : "test2",
    ... "userslug" : "test2",
    ... "email" : "test2@test.com",
    ... "joindate" : 1525421227139.0,
    ... "lastonline" : 1525421227139.0,
    ... "picture" : "",
    ... "fullname" : "",
    ... "location" : "",
    ... "birthday" : "",
    ... "website" : "",
    ... "signature" : "",
    ... "uploadedpicture" : "",
    ... "profileviews" : 0,
    ... "reputation" : 0,
    ... "postcount" : 0,
    ... "topiccount" : 0,
    ... "lastposttime" : 0,
    ... "banned" : 0,
    ... "status" : "online",
    ... "uid" : 6,
    ... "password" : "$2a$12$buM7xOHIJdy.RK.eTmBph.EzPAIirzTjjDsLHjG/Y7Ogs0CvQlZES",
    ... "passwordExpiry" : 0
    ... })

    but I can't login to my nodebb project. That appear 403 error.
    Do you know why?

    sorry, I can't speak english well.


Log in to reply
 

Suggested Topics

| |