stef / libopaque

c implementation of the OPAQUE protocol with bindings for python, php, ruby, lua, zig, java, erlang, golang, js and SASL.
GNU Lesser General Public License v3.0
69 stars 10 forks source link

Invalid declaration? #30

Closed proguy18 closed 1 year ago

proguy18 commented 1 year ago

image

I assumed demo/public/libopaque.js wasn't completed, so I copied over the contents of dist/libopaque.js over, and it kind of fixed the error. However, I am unable to test the demo functionality.

image

I am unsure of the contents of libopaque.js (and how to read it) but I am willing to attempt using the this library in my client authentication system. Guidance on where to start would be gladly appreciated.

proguy18 commented 1 year ago

I have went ahead and tried debugging, and the problem error arises in line 364 of libopaque.debug.js. I'm assuming context was never instantiated, therefore, is left empty.

image

sofiawong commented 1 year ago

I have issues using libopaque for js side. I also tried to install libopaque through npm but it also gives me error

This error occurs when I paste libopaque.js inside the node modules folder. I already install fs module image

@stef Thanks!

sofiawong commented 1 year ago

I have issues using libopaque for js side. I also tried to install libopaque through npm but it also gives me error

This error occurs when I paste libopaque.js inside the node modules folder. I already install fs module image

@stef Thanks!

I solved the issue by downgrading react-scripts v 5.0.1 to v 4.0.0 to resolve the fs module not found

stef commented 1 year ago

@proguy18 js/demo might be a bit bitrotten away, sorry about that, it might or might not work. i'm not a js guy, most of the js code was contributed by @creemama i'm able to maintain it and keep it working, but i have no or very little understanding of this demo, and i think it might be out of sync with the rest of the codebase. however you can find demos in /demos/... of which two contain client-side js which runs in a browser and these are also maintained and run on my demo server at:

stef commented 1 year ago

if this answers your question and resolves your issue, please close this issue at your earliest convenience.

stef commented 1 year ago

@sofiawong great that you solved your issue by downgrading. however i'd like to ask you to open separate issues for problems unrelated to the issue here or elsewhere.

stef commented 1 year ago

i have to admit i have never (afaik) created or submitted an npm package. as said earlier here, i'm not a js guy, i have no clue how these things go. i suppose it might be related to the js/package.json file somehow? anyway that should clearly explain why installing libopaque from npm might not work, it is simply because the npm package is outdated and needs to be updated. any help with js is very warmly welcome ;)

stef commented 1 year ago

btw sorry for the late response, holidays, afk.

stef commented 1 year ago

please keep me up to date if you ever build something with libopaque, i'm very interested in people using and deploying this.

proguy18 commented 1 year ago

Will do,

Currently trying to make a simple authentication system using OPAQUE, just haven’t found a js one with examples or good documentation until this one. Assumed the demo was based on the codebase so I assume the demos broken but the code’s not? Will try resume building my app and keep you posted!

On Sat, Sep 3, 2022 at 3:29 AM Stefan Marsiske @.***> wrote:

please keep me up to date if you ever build something with libopaque, i'm very interested in people using and deploying this.

— Reply to this email directly, view it on GitHub https://github.com/stef/libopaque/issues/30#issuecomment-1235872183, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMZOPAEHTBSKJZFG2H66LDV4JPRFANCNFSM56H2MRTA . You are receiving this because you modified the open/close state.Message ID: @.***>

-- Sent from Gmail Mobile

stef commented 1 year ago

Will do, Currently trying to make a simple authentication system using OPAQUE, just haven’t found a js one with examples or good documentation until this one. Assumed the demo was based on the codebase so I assume the demos broken but the code’s not? Will try resume building my app and keep you posted!

nah, it's the other way around, the https://github.com/stef/libopaque/tree/master/demos are working and maintained, while this https://github.com/stef/libopaque/tree/master/js/demo is mostly bitrotting away sadly, i guess i should remove this, or fix it.