-
Notifications
You must be signed in to change notification settings - Fork 622
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
Not implemented: crypto.Hmac error with Jsonwebtoken #2557
Comments
I'm taking a stab at this one! |
Looks like there's some more unimplemented bits. As pointed out by @ricardodalarme, Octokit seems to use
|
@penberg alright! I'll take a look at it too, the HMAC implementation is kinda done, but there are still some tests missing and the type checking is not right too. I guess that I can take a look this Sunday |
hey, @luk3skyw4lker any progress on that? |
@ricardodalarme yep! I have made some progress on the PR, the tests are the only thing missing, I'll do them probably this weekend |
okkk, thank you so much @luk3skyw4lker |
Hey! I'm trying to implement an application that use the google api method but i'm getting this error: error: Uncaught Error: Not implemented: crypto.Sign
throw new Error(message);
^
at notImplemented (https://deno.land/[email protected]/node/_utils.ts:23:9)
at new Sign (https://deno.land/[email protected]/node/internal/crypto/sig.ts:45:5)
at Object.createSign (https://deno.land/[email protected]/node/crypto.ts:268:10)
at Object.sign (https://esm.sh/v96/[email protected]/deno/jwa.js:4:1429)
at Object._ [as sign] (https://esm.sh/v96/[email protected]/deno/jws.js:2:2447)
at f.requestToken (https://esm.sh/v96/[email protected]/deno/gtoken.js:2:4605)
at f.getTokenAsyncInner (https://esm.sh/v96/[email protected]/deno/gtoken.js:2:3592)
at f.getTokenAsync (https://esm.sh/v96/[email protected]/deno/gtoken.js:2:3169)
at f.getToken (https://esm.sh/v96/[email protected]/deno/gtoken.js:2:2390)
at V.refreshTokenNoCache (https://esm.sh/v96/[email protected]/deno/google-auth-library.js:3:22114)
FAIL I ran this same code in nodejs and it's worked well. deno 1.26.1 (release, x86_64-unknown-linux-gnu)
v8 10.7.193.3
typescript 4.8.3 |
I know that googleapis is an npm packages and that is intended for nodejs but i wanted to try it with deno. |
googleapis seems to depend on gRPC, which is not yet supported in Deno, although it seems that it is being worked on denoland/deno#3326 (comment). For the REST APIs, you may want to try the browser version: https://github.com/google/google-api-javascript-client |
Maybe worth mentioning: This is also blocking npm AWS SDK usage. I wonder if there's any way to polyfill this with something like |
I'll give this a crack. |
I'm getting error: |
All aliyun npm prompts: Not implemented: crypto.Hmac, is there a solution? |
thanks, it will help me a lot |
closed by #2664 |
For people stumbling here and using esm.sh to get JSON Web Token into deno; I had to force esm to use [email protected] via |
No solutions yet? |
The Standard Library no longer contains the implementation for the Node compatibility layer. If you're still having issues, please see the repo for the Deno CLI. |
Not sure if this is of any help to anyone but I wrote a module that gets Google auth tokens and now I just use Google's REST apis/endpoints directly rather than using and relying on the googleapis package. Use it everyday for work. |
To clarify, @Ciscodefran, if you still have issues, please open an issue in the Deno CLI repo. |
Thank you so much @elekram . you are a legend :) |
Describe the bug
I am trying to use jsonwebtoken with Deno's compatibility mode, but I am seeing the following error:
Uncaught Error: Not implemented: crypto.Hmac
Steps to Reproduce
With the following webtoken.mjs file:
deno run
(in compat mode) fails as follows:Expected behavior
Environment
The text was updated successfully, but these errors were encountered: