Jump to content

Sharing session with NodeJS application


Michał Jackowski

Recommended Posts

Posted

Hello, I am developing realtime NodeJS app, which I'd like to integrate with IPS Community.

I was wondering - what would be the easiest way to achieve session share between NodeJS app (heavly focused on Socket.IO) and IPS Community forum. 

My first idea was to pull in PHP JWT library and modify login method, then I could easily parse that in my NodeJS app, but this raises a problem - JWT would ideally reflect PHP Session - that's definitely improper solution. Since IPS cookies aren't encrypted, they aren't reliable in that case.

I have one more idea - use memcached as cachedrvier with some nodejs implementation of PHP's unserialize. This would give satisfying results without ingerating into IPS codebase.

Has anyone been there, am I missing something? I would really appreciateif you guys could point me in the right direction.

Posted

I would use redis instead of memcache. there are readily available redis libs for nodejs already, and then you could use IPS redis cache driver, to store the session info from the core_sessions table, and then on the node side, include the ips4front_session cookie as apart of your handshake.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...