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

JWT error blocks uploads #94

Open
mountainmiller opened this issue Oct 10, 2022 · 0 comments
Open

JWT error blocks uploads #94

mountainmiller opened this issue Oct 10, 2022 · 0 comments

Comments

@mountainmiller
Copy link

I suspect this may be a configuration error on my part, but the documentation is a bit sparse.

Symptom

I am using KiwiIRC connecting via a WebSocket to Ergo IRCd on the same server, so I have the plugin server, as I am not using a webircgateway. When I go to upload a file, after selecting an image file and hitting the "Upload" button, I get the console message

Tokens were not available synchronously. Cancelling upload start and acquiring tokens.

And then after a delay of a few seconds, this pops in a little bubble on the upload dialog.

Unhandled error acquiring EXTJWT tokens!

At no point during this do I see any new requests in the Network tab of the browser Dev Tools.

Config details

In the plugin server config, I have

[Server]
ListenAddress = "127.0.0.1:8088"

and further down

[JwtSecretsByIssuer]
"example.net = "[SECRET]"

With the corresponding JWT config in my Ergo config file:

extjwt:
    expiration: 45s
    secret: "[SECRET]"

In the KiwiIRC config.json,

  "plugins": [
    { "name": "fileuploader", "url": "static/plugins/plugin-fileuploader.js" },
  ],
  "fileuploader": {
    "server": "http://example.net/chat-files",
    "maxFileSize": ,
    "note": "Add an optional note to the upload dialog"
  }

Then I have nginx set up to reverse proxy the server endpoint:

    # KiwiIRC 
    location /chat-files {
		    proxy_pass http://127.0.0.1:8088;
		    proxy_read_timeout 1m;
		    proxy_http_version 1.1;
		    proxy_set_header X-Forwarded-For $remote_addr;
		    proxy_set_header X-Forwarded-Proto $scheme;
    }

What am I doing wrong here?

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

1 participant