opaque
opaque copied to clipboard
Split the client and server implementation into separate exports
My client-side code shouldn't need the server-side validation logic in it. It should be possible to say:
import { clientRegister, clientAuthenticate } from "@nthparty/opaque"; // ES6 / TypeScript
// or:
const clientRegister = require("@nthparty/opaque/clientRegister");
const clientAuthenticate = require("@nthparty/opaque/clientAuthenticate");
// alternatively:
const OPAQUE = require("@nthparty/opaque/client");
const clientRegister = OPAQUE.clientRegister;
const clientAuthenticate = OPAQUE.clientAuthenticate;
This way you only import what you need
I totally agree that the client side and server side implementation should be splitted so that they don't need to include each other.