My users schema (currently) looks like this:
UserSchema = new SimpleSchema(
{
username: { type: String, required: true },
services: Object,
'services.password': Object,
'services.password.bcrypt': String,
'services.resume': { type: Object, blackbox: true },
emails: { type: Array, label: "Email Addresses" },
'emails.$': Object,
'emails.$.address': String,
'emails.$.verified': Boolean,
createdAt: Date,
profile: { type: Object, blackbox: true },
...
},
{ tracker: Tracker, requiredByDefault: false }
);
In order to use Uniforms to create an automatic form field for a password, I need to do this:
<TextField
name="services.password.bcrypt"
label={false}
placeholder="Password"
showInlineError
/>
Using the actual name seems to be unsafe? It exposes a direct structure for users’ password hashes? Is there a way to create a name alias to be used in form elements?