Useraccounts default password schema?


#1

Hi

I try to make an option to change password with a method. But i have a doubt.

What are the properties for the password in user accounts? Only the min length (six characters) and type (string)?

Here is part of my method.

Meteor.methods({
    'users.update'({email, pass, passAgain}) {
        // Check if user data is loaded
        user = Meteor.user();
        if (!user) {
            throw new Meteor.Error("try-again");
        }
        // Validate
        new SimpleSchema({
              email: {
                type: String,
                regEx: SimpleSchema.RegEx.Email
            },
            pass: {
                type: String,
                min: 6
            },
            passAgain: {
                type: String,
                min: 6
            }

        }).validate( {email, pass, passAgain} );
       ......

Thanks :slight_smile: