Using Session Sharing Plugin with Rails Application
-
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 => current_user.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.
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
Copyright © 2024 NodeBB | Contributors