Skip to content

Does JWT middleware verify websocket connections? #2276

Answered by aldas
oSethoum asked this question in Q&A
Discussion options

You must be logged in to vote

Websocket in browsers do not allow adding custom headers (ala JWT). See https://stackoverflow.com/a/4361358/2514290

Search for "Websocket + token auth" Basically you create one-time token before connecting to the websocket and when connecting to the websocket provide that token in url (as query param for example).

Replies: 3 comments 18 replies

Comment options

You must be logged in to vote
4 replies
@oSethoum
Comment options

@AndriyKalashnykov
Comment options

@oSethoum
Comment options

@AndriyKalashnykov
Comment options

Answer selected by oSethoum
Comment options

You must be logged in to vote
1 reply
@oSethoum
Comment options

Comment options

You must be logged in to vote
13 replies
@AndriyKalashnykov
Comment options

@oSethoum
Comment options

@oSethoum
Comment options

@AndriyKalashnykov
Comment options

@oSethoum
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants