将 1.0 升级到 1.2.1 后,我的流星项目遇到问题。问题说forgotPwd route configured but showForgotPasswordLink set to false
。但是当我签入时,showForgotPasswordLink 的值本身就是 true AccountsTemplates.configure(packages\telescope-core\lib\config.js)
。
有人对这个问题有想法吗?
提前致谢
将 1.0 升级到 1.2.1 后,我的流星项目遇到问题。问题说forgotPwd route configured but showForgotPasswordLink set to false
。但是当我签入时,showForgotPasswordLink 的值本身就是 true AccountsTemplates.configure(packages\telescope-core\lib\config.js)
。
有人对这个问题有想法吗?
提前致谢
我假设您的Telescope/packages/telescope-core/lib/config.js
文件中有以下代码:
//Routes
AccountsTemplates.configureRoute('signIn');
AccountsTemplates.configureRoute('signUp', {
path: '/register'
});
AccountsTemplates.configureRoute('forgotPwd');
AccountsTemplates.configureRoute('resetPwd');
AccountsTemplates.configureRoute('changePwd');
//AccountsTemplates.configureRoute('enrollAccount');
//AccountsTemplates.configureRoute('verifyEmail');
// Options
AccountsTemplates.configure({
enablePasswordChange: true,
showForgotPasswordLink: true,
confirmPassword: false,
overrideLoginErrors: true,
lowercaseUsername: true,
negativeFeedback: false,
positiveFeedback: false,
negativeValidation: true,
positiveValidation: true
});
您收到错误forgotPwd route configured but showForgotPasswordLink set to false
是因为执行顺序错误。
注意:某些路由需要提前设置其他用户帐户的常规选项。请确保在调用常规 AccountsTemplates.configure 之后执行对 AccountsTemplates.configureRoute 的调用
因此,您需要放置AccountsTemplates.configureRoute
after AccountsTemplates.configure
。
// Options
AccountsTemplates.configure({
enablePasswordChange: true,
showForgotPasswordLink: true,
confirmPassword: false,
overrideLoginErrors: true,
lowercaseUsername: true,
negativeFeedback: false,
positiveFeedback: false,
negativeValidation: true,
positiveValidation: true
});
//Routes
AccountsTemplates.configureRoute('signIn');
AccountsTemplates.configureRoute('signUp', {
path: '/register'
});
AccountsTemplates.configureRoute('forgotPwd');
AccountsTemplates.configureRoute('resetPwd');
AccountsTemplates.configureRoute('changePwd');
//AccountsTemplates.configureRoute('enrollAccount');
//AccountsTemplates.configureRoute('verifyEmail');