WebSocketBundle icon indicating copy to clipboard operation
WebSocketBundle copied to clipboard

user is always anon

Open manojmht opened this issue 9 years ago • 5 comments

user is always anon even after session configured through redis

manojmht avatar Oct 05 '16 11:10 manojmht

Can you put here your redis session configuration? Do you use SncRedisBundle for this purpose?

mwsv avatar Nov 17 '16 20:11 mwsv

I have the same problem. I followed ClientSetup and SessionSetup and I would like to retrieve the authenticated user when some one suscribe to my topic. I didn't understand something I think, but what ? Any idea, please ?

Ang3 avatar Feb 22 '17 22:02 Ang3

Same here, I followed exactly the readme "Session sharing and user authentication" > "Symfony PDO Session Handler". (symfony 3.2.1)

remigarcia avatar Feb 23 '17 07:02 remigarcia

It seems the bundle is registering an anonymous token instead of a UserInterface.. Perhaps from WebsocketAuthenticationProvider.php.. Session identifiers in the ratchet console and stored in database are not the same, is it normal ?

In "Session sharing and user authentication", do we have to follow "Client Storage" in more of "Symfony PDO Session Handler" ?

Ang3 avatar Feb 23 '17 09:02 Ang3

Ok, well. 2 days in hell, but I think I found what's happens ! We must use the same host than the web socket server. The WebSocketServer host must be the same than the VHOST one. Perhaps we may add 'origins' to allow another host, dunno. @remigarcia did you configure a VHOST to access to your app ? :-)

Ang3 avatar Feb 23 '17 11:02 Ang3