From 18605d02db83904f733464aa2e15e702da4ffc42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Thu, 23 Jun 2022 20:59:05 +0800 Subject: [PATCH] fix: missing default config --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 5ab5f2e..3b09478 100644 --- a/src/index.js +++ b/src/index.js @@ -76,7 +76,12 @@ class UniID { if (this._clientInfo.platform === 'h5') { this._clientInfo.platform = 'web' } - const defaultConfig = {} + const defaultConfig = { + tokenExpiresIn: 7200, + tokenExpiresThreshold: 1200, + passwordErrorLimit: 6, + passwordErrorRetryTime: 3600 + } const argsRequired = ['tokenSecret', 'tokenExpiresIn'] const config = Object.assign(defaultConfig, appConfig, appConfig[this._clientInfo.platform]) argsRequired.forEach((item) => { -- GitLab