feat: utilities section (wip) + auth utilities

This commit is contained in:
Nick committed 2019-06-30 15:18:26 -04:00
1 parent 9cd8657ce6
commit 604941fe6a
15 files changed
+496 -184

No files matched your search

+1 -1
View File
@@ -336,7 +336,7 @@ module.exports = class User extends Model {
static async loginTFA(opts, context) {
if (opts.securityCode.length === 6 && opts.loginToken.length === 64) {
let result = null // await WIKI.redis.get(`tfa:${opts.loginToken}`)
let result = await WIKI.redis.get(`tfa:${opts.loginToken}`)
if (result) {
let userId = _.toSafeInteger(result)
if (userId && userId > 0) {