0
當我添加新用戶並打開接收到的驗證電子郵件中的鏈接時,新用戶已登錄但無法更改密碼。當我去「更改密碼」時,我將「當前密碼」留空,輸入密碼,然後單擊「更改密碼」,出現「匹配失敗」錯誤。新用戶無法在流星中更改密碼
用戶與Meteor.call從客戶端創建到以下方法:
Meteor.methods({
createUser: function(user) {
var userID = Accounts.createUser({
username: user.username,
email: user.email,
profile: {
firstName: user.firstName,
lastName: user.lastName,
}
});
Accounts.sendVerificationEmail(userID);
}
});
我有Accounts.config和Accounts.ui.config以下設置:
Accounts.ui.config({
passwordSignupFields: 'USERNAME_AND_EMAIL'
})
Accounts.config({
forbidClientAccountCreation: false,
sendVerificationEmail: true
})
謝謝:-)
案例是空密碼。我已經嘗試過使用'password:「」',但結果相同。但你的答覆仍然是一個答案:-)謝謝! – react0r
does Accounts.setPassword(this.userId,newPassword);仍然存在於流星?我有未定義的功能,當我叫它 – Genjuro
@Genjuro是它仍然存在(https://github.com/meteor/meteor/blob/devel/packages/accounts-password/password_server.js#L327-L342)。確保你已經添加了'accounts-password' – Akshat