Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
type: 'password',
name: 'passwordRepeat',
message: 'Confirm Password:',
validate(val, answers) {
if (val.trim() === '') {
return false;
}
if (val.trim() !== answers.password.trim()) {
return `Passwords don't match!`;
}
return true;
},
},
];
let answers = await prompt(questions);
let registeredUser = await UserManager.registerAsync(answers);
console.log('\nThanks for signing up!');
return registeredUser;
}
message: 'Password Repeat:',
validate(val, answers) {
if (val.trim() === '') {
return false;
}
if (val.trim() !== answers.password.trim()) {
return `Passwords don't match!`;
}
return true;
},
},
];
const answers = await inquirer.prompt(questions);
const registeredUser = await UserManager.registerAsync({
...answers,
});
console.log(chalk.green('\nRegistration successful!'));
return registeredUser;
}
async (dispatch: AppDispatch, getState: () => AppState) => {
const state = getState();
const user = await UserManager.registerAsync(userData, state.auth.user);
return {
user,
};
},
(actionType, payload) => ({