Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending token (for JWT) to socket.io server #22

Open
frey1esm opened this issue Mar 25, 2016 · 1 comment
Open

Sending token (for JWT) to socket.io server #22

frey1esm opened this issue Mar 25, 2016 · 1 comment

Comments

@frey1esm
Copy link

Is it possible to add a query parameter when connecting to a socket.io server, so that client can be authenticated (via JWT)?

In a javascript client, it is as easy as:

var socket = io.connect('http://localhost:9000', {
  'query': 'token=' + your_jwt
});
@frey1esm frey1esm changed the title Sending token (for JWT) to scoket.io server Sending token (for JWT) to socket.io server Mar 25, 2016
@aPoCoMiLogin
Copy link

But you are not connecting directly with that lib to socket.io, it's only sending "messages" trough redis serwer. There is no need for such tokens, you just need redis serwer which will be a bridge between socket.io server and other emitters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants