Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Use feathers-socketio? and rest&socket share session maybe? #269

Closed
simonjoom opened this issue Aug 13, 2016 · 3 comments
Closed

Use feathers-socketio? and rest&socket share session maybe? #269

simonjoom opened this issue Aug 13, 2016 · 3 comments

Comments

@simonjoom
Copy link

I think we should to use express-session and no need anymore cookie-parser - > Since version 1.5.0, the cookie-parser middleware is no need

And add middleware fonctionnalities with socket-io

why not use share sessions between rest and socket to get things working all together?
why not use feathers-socketio instead socket?

see: http://stackoverflow.com/questions/25532692/how-to-share-sessions-with-socket-io-1-x-and-express-4-x

@daffl
Copy link
Member

daffl commented Aug 13, 2016

feathers-authentication does not use sessions. The Cookie parser is only for getting the JWT from a cookie which is usually only the case with server side rendering.

You can also already use your own Socket.io middleware as documented here.

@simonjoom
Copy link
Author

simonjoom commented Aug 13, 2016

Thks for replying, yes i saw it that it 's not using sessions.
Just can i ask why you decided that? better to use only cookie for server-side rendering?

In fact i was worry about cookies is not good.

but yes cookie-parser is not a real cookie, for me a cookie is stored in client-side.
I was worry about lost token when cookie is removed.

They should to not use this name 'cookie-parser' because it's just something in the request header.

@daffl
Copy link
Member

daffl commented Aug 14, 2016

Well cookie-parser just passes the cookie request header so the name isn't necessarily wrong. The cookie is just one way to provide the JWT though. You can easily disable cookies and manage the tokens yourself (the client does that for you already).

@daffl daffl closed this as completed Aug 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants