0
我使用Google recaptcha来授权用户不是机器人,这部分工作! :)Accounts.validateLoginAttempt破坏用户在刷新后保持登录
我用
Accounts.validateLoginAttempt((data) => {
if (someThingThatWillValidateTrueIfUserIsLoggedIn) {
return true // Will not run google Captcha security messure..
}
}
,使我的职务要求序Google验证公众。我想我的问题是我应该用什么来从validateLoginAttempt返回真正的imediatly。如果我删除validateLoginAttempt,用户将在刷新后保持登录状态。
我尝试使用
Accounts.user() // Undef
Meteor.user() // Undef
this.connection // Undef
this.userId // Undef
,但没有运气...我如何使用validateLoginAttempt和保持用户的能力保持登录浏览器后刷新?