-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Strange issue when using alongside with koa #33
Comments
I've done some research over at the koa issue (koajs/koa#670) and it appears that argon2 breaks when called from a http server listener. Here's a broken example without koa: https://gist.github.com/PlasmaPower/f3cc2c06875eee760d81 I propose renaming this issue to reflect that it's a problem when used with the http library in general, not just koa. |
Please follow #25 which is the same problem. I've been discussing with Nan maintainers too on how to solve this issue, which does not only affects node-argon2 but any package that implements promises on the C++ side. (Thanks for the report. I myself started this package for use with Koa 😀 ) |
To clarify, this issue is for http servers in general. |
I've run into this issue as well and worked around it by using the synchronous methods instead. Unfortunately, it outputs a warning to the console which pollutes my server logs. Can we get rid of the warning until this is resolved or at least only warn once instead of each time? Happy to submit a pull request if you need... |
It's because the synchronous methods will be removed before v1.0. I'm working to fix this promise issue soon. |
Marking as duplicate of #25 since they are closely related. |
One way to fix this issue is to avoid using promises in a C++ module altogether. You can use This is the approach I've taken in argon2-ffi. I don't actually handle promises in my library--it's all callback-based. However, for projects seeking to use |
@cjlarose no point in using the same code you already maintain. I'd also suggest that you maintain promise-based options since that's the direction ES2015 is moving towards and more people are using async/await now 😄 |
Hi,
Sorry for linking but I really don't want to copy-paste it here too, so please follow my link to the koa issue I've just created koajs/koa#670 - koa works strange with node-argon2. I don't know why it happens but there is a strange timeout in the hash function if I use argon with koa. Examples in the linked issue. I've set up some easy examples to show the "bug".
Environment
Operating system: Mac OS X Yosemite 10.10.5
Node version: v5.2.0
Argon version: 0.9 (latest)
Cheers
The text was updated successfully, but these errors were encountered: