opaque icon indicating copy to clipboard operation
opaque copied to clipboard

Split the client and server implementation into separate exports

Open stevendesu opened this issue 3 years ago • 1 comments

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

stevendesu avatar Mar 23 '21 20:03 stevendesu

I totally agree that the client side and server side implementation should be splitted so that they don't need to include each other.

yw662 avatar Jul 12 '21 17:07 yw662