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

Convert @nangohq/node to @nangohq/js -- remove node dependencies #2068

Open
lawrencecchen opened this issue Apr 29, 2024 · 4 comments
Open
Labels

Comments

@lawrencecchen
Copy link

I'm using Cloudflare Workers/Durable Objects and can't use the nango client libraries due to axios and other uses of node:crypto. I've been using a fetch wrapper instead:

async function nangoProxy(input: ProxyConfiguration) {
  return await fetch(`https://api.nango.dev/proxy/${input.endpoint}`, {
    headers: {
      "Content-Type": "application/json; charset=utf-8",
      Authorization: `Bearer ${env.NANGO_SECRET_KEY}`,
      "Provider-Config-Key": input.providerConfigKey ?? "",
      "Connection-Id": input.connectionId ?? "",
    },
    body: JSON.stringify(input.data),
    method: input.method,
  }).then((r) => r.json());
}

It would be great if the official library becomes edge compatible as well.

Copy link

linear bot commented Apr 29, 2024

@linear linear bot added the GitHub label Jun 7, 2024
Copy link
Member

Thanks for submitting this. Most people consume this SDK from their backend, but I understand that it's different in your case. Unfortunately we don't have a timeline to support this, but we will send an update when we do.

@lawrencecchen
Copy link
Author

lawrencecchen commented Jun 17, 2024

Most people consume this SDK from their backend

Just to clarify, I'm using nango from my cloudflare workers backend which is missing some node builtins.

But understand that bandwidth is limited -- would a PR here be accepted?

@bastienbeurier
Copy link
Member

Got it.

Thanks for proposing to contribute, it's much appreciated.

What would be the nature of the contribution?

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

No branches or pull requests

2 participants