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和保持用戶的能力保持登錄瀏覽器後刷新?