bnoguchi/mongoose-auth

lib / modules / password / index.js note

Opened this issue · 2 comments

In the following code, if some one was to use loginWith: login the code needlessly calls delete schema.login;.
In another note should we absolutely be confined to value being of type String?

Object.defineProperty(exports, 'specialOptHandlers', {
    value: {
        loginWith: function (value) {
          if (value) {
            delete schema.login;
            schema[value] = { type: String, unique: true };
            everyauth.password.loginWith(value);
          }
        }...

What would you use instead of String?

Well, most types can be flattened to a String, I guess I was looking too far forward.