Using Session Sharing Plugin with Rails Application

NodeBB Plugins
  • Re: [nodebb-plugin-session-sharing] Session Sharing

    I am trying to use this plugin to connect the authentication process of my Rails Application and NodeBB (both of them are running locally on different ports)

    jwt_secret = "myS3cr3tk3y"
    payload = { :id =>, :username => current_user.username }
    puts payload
    token = JWT.encode payload, jwt_secret, 'HS256'
    puts token
    decoded_token = JWT.decode token, jwt_secret, true, { algorithm: 'HS256' }
    puts decoded_token
    session[:nodebb_token] =  { value: token, HttpOnly:true }

    This is the code for writing the cookies.

    Screenshot from 2021-03-13 22-48-11.png
    This is the configuration for the plugin.
    Is something wrong with my code or the configuration?? Can someone help me find out the issue?? @julian

Suggested Topics