upstash / qstash-js

Message queue for serverless
https://docs.upstash.com/qstash
MIT License
135 stars 12 forks source link

SvelteKit Support #20

Open Spikeysanju opened 1 year ago

Spikeysanju commented 1 year ago

Since I have been using the QStash library with Next JS and I find it amazing, I am wondering if Upstash has any plans to make it compatible with SvelteKit and its stand alone API endpoints. I am aware that a lot of work would need to be done, such as verifying JWT tokens, but SvelteKit is only 5 issues away from its 1.0 stable release. Any help would be greatly appreciated. Thank you in advance.

chronark commented 1 year ago

I have never used svelte, but you could use the Receiver manually, right?

import { Receiver } from "@upstash/qstash"

const receiver = new Receiver({
  currentSigningKey: "...",
  nextSigningKey: "...",
});

const isValid = await receiver.verify({
  signature: "...",
  body: "...",
})

What are the issues you see with using this in svelte?

First class support for svelte sounds nice, I just don't really have much capacity right now and also don't know svelte at all. But I would love to get contributions for this! <3