I'm tryin' to use active sessions (started in php) in node.js
For PHP i'm storing sessions in mysql (by using session_set_save_handler
as described in http://phpsecurity.org/code/ch08-2). Works fine for PHP.
Now planed to:
1) from php app's client side "execute" node.js link with client's PHPSESSID cookie in GET:
http://192.168.0.222:53077/?phpsession=02isg9kv8fbveqhmt1htcj6cc7
2) on node.js server side get PHPSESSID, look for it's value in mysql sessions table
3) if PHPSESSID value exists in mysql - read user's id, name and other user's data stored in mysql (sessions table)
Question is - is it right way? I think i'm wrong, at least from step 2. What is the right way to work in Node.js with sessions stored in mysql started from php?
Please try to don't advise me to store sessions in memcached or redis, i'm chose mysql.