-
Notifications
You must be signed in to change notification settings - Fork 143
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
Drop native node Buffer API dependency #136
Comments
@tfalencar's issue has been closed as unfortunately apg-js is unwilling to find an alternative to Buffer. Removing dependence on Buffer is incredibly important for portability |
yeah this doesn't work in a FE for some functions |
… API usage - Fixes (spruceid#136)
I'm no longer using this approach - and not maintaining this package. |
…issue - See spruceid/siwe#136 (comment) for details. - Changed message verification to use SIWE libraries.
@tfalencar Thanks for your contribution, I'll bring up the discussion with the team today, we'll probably have our own fork as you mentioned but we'll make sure to credit your contribution. Will update the results soon. |
… API usage - Fixes (spruceid#136)
Any update on this? |
I tried importing your fork in vite using |
Please check with the Spruce team, it seems they have another library now (SSX), maybe it doesn't have this issue. I don't know if this problem will be solved in spruce/siwe. |
hey @tfalencar I would consider SSX but i'm doing a hackathon and I only have a couple days and I need siwe :) I'm not sure if your Buffer-friendly clone can be installed / imported using vite JS, but if you have any tips, I'd really appreciate it. I promise I won't leave it in a prod environment, it's just for a proof of concept |
hey! I'm needing this as well. It's important to understand that many applications (everytime gets bigger) are running on the edge runtime, meaning that we don't have NodeAPIs. To me, it's a must for an application to remove all dependencies from Node and replace them with Web APIs can at least the mantainer hint what changes would this include? I could take a look at it. The codebase seems small enough to work on |
For anyone seeing this in 2024, I got it working: https://www.npmjs.com/package/cloudflare-siwe |
@dankcellar will you open source this in the future? would love to use it! |
@jwcheon https://github.com/dankcellar/siwe here it is, and I am using parcel now, I had to redo the npm package as well 😭 https://www.npmjs.com/package/siwe-cloudflare |
After #115 was merged, I gave SIWE release version 2.1.3 a try.
However, it turns out the 'apg-js' package (one of the few dependencies of this project), seems to make use of the Buffer API as well, as can be seen here:
https://github.com/ldthomas/apg-js/search?q=buffer
I've opened a ticket there to see if there's positive feedback on solving this: ldthomas/apg-js#9
I think this is the last missing piece to get siwe working without workarounds in frameworks like Sveltekit. If the mentioned library can't be changed, it would be interesting to know if there is any other alternative.
The text was updated successfully, but these errors were encountered: