Auth with SocketIO

Hi team!
I’m working on TYK gateway setup, I’m using SocketIO for streaming data to the client, the auth is via sending “auth” token in the WS request (as is the standard by SocketIO). In my case the token is JWT.

I want to use TYK in order to validate the JWT.

Unforgently because the browser does NOT supports sending headers in WS connection, this means that TYK blocks the connection and SocketIO downgrade to polling instead of WS.

Does anyone can help with setup JWT auth that is compatible with SocketIO?

Thanks in advance!

Hello @Bar_Admoni and welcome to the community.

Have you had a look at our auth config settings. There could be one or two there that might be of help. Maybe the use_param or use_cookie as auth may assist here.

"jwt": {
        "disable_header": false,
        "auth_header_name": "Authorization",
        "cookie_name": "auth_cookie",
        "name": "",
        "validate_signature": false,
        "use_param": true,
        "signature": {
          "algorithm": "",
          "header": "",
          "use_param": false,
          "param_name": "",
          "secret": "",
          "allowed_clock_skew": 0,
          "error_code": 0,
          "error_message": ""
        "use_cookie": true,
        "param_name": "auth_query",
        "use_certificate": false