diff --git a/.eslintrc.js b/.eslintrc.js
index 60a9b4f..420e593 100755
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -43,7 +43,6 @@ module.exports = {
       }
     ],
     'no-alert': 'error',
-    'no-console': 'error',
     'no-const-assign': 'error',
     'no-else-return': 'error',
     'no-empty': 'off',
diff --git a/Changelog.md b/Changelog.md
index e44ee92..185fea1 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,4 +1,12 @@
 # 变更历史
 
+
+## 2020-02-06
+* 优化COS实例创建代码
+
+## 2020-02-06
+* 修复rollback操作可能出现函数状态错误问题
+* 优化函数状态检测部分代码
+
 ## 2019-11-26
 * 更新函数状态，提高部署成功率
diff --git a/deploy/lib/deployFunction.js b/deploy/lib/deployFunction.js
index 2ab1a9d..e206538 100644
--- a/deploy/lib/deployFunction.js
+++ b/deploy/lib/deployFunction.js
@@ -21,19 +21,7 @@ class DeployFunction extends AbstractHandler {
       }
       this.serverless.cli.log('Updating code... ')
       await this.updateFunctionCode(ns, funcObject)
-      // when update code Status is Active, continue
-      let status = 'Updating'
-      let times = 90
-      while (status == 'Updating') {
-        const tempFunc = await this.getFunction(ns, funcObject.FuncName)
-        status = tempFunc.Status
-        await utils.sleep(1000)
-        times = times - 1
-        if (times <= 0) {
-          throw `Function ${funcObject.FuncName} update failed`
-        }
-      }
-      if (status != 'Active') {
+      if ((await this.checkStatus(ns, funcObject)) == false) {
         throw `Function ${funcObject.FuncName} update failed`
       }
       this.serverless.cli.log('Updating configure... ')
@@ -43,6 +31,18 @@ class DeployFunction extends AbstractHandler {
     return null
   }
 
+  async checkStatus(ns, funcObject) {
+    let status = 'Updating'
+    let times = 90
+    while ((status == 'Updating' || status == 'Creating') && times > 0) {
+      const tempFunc = await this.getFunction(ns, funcObject.FuncName)
+      status = tempFunc.Status
+      await utils.sleep(1000)
+      times = times - 1
+    }
+    return status != 'Active' ? false : true
+  }
+
   async addRole() {
     try {
       const roleName = 'SCF_QcsRole'
diff --git a/deploy/tencentDeploy.js b/deploy/tencentDeploy.js
index 2aa2772..01eec4d 100644
--- a/deploy/tencentDeploy.js
+++ b/deploy/tencentDeploy.js
@@ -27,17 +27,7 @@ class TencentDeploy {
 
   async deploy() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
 
     const services = this.provider.getServiceResource()
@@ -76,19 +66,7 @@ class TencentDeploy {
       this.serverless.cli.log(`Setting tags for function ${funcObject.FuncName}`)
       await func.createTags('default', funcObject.FuncName, funcObject.Properties.Tags)
 
-      // Function status
-      let status = 'Updating'
-      let times = 90
-      while (status == 'Updating' || status == 'Creating') {
-        const tempFunc = await func.getFunction('default', funcObject.FuncName)
-        status = tempFunc.Status
-        await utils.sleep(1000)
-        times = times - 1
-        if (times <= 0) {
-          throw `Function ${funcObject.FuncName} create/update failed`
-        }
-      }
-      if (status != 'Active') {
+      if ((await func.checkStatus('default', funcObject)) == false) {
         throw `Function ${funcObject.FuncName} create/update failed`
       }
 
@@ -134,11 +112,17 @@ class TencentDeploy {
       if (this.options.function && this.options.function != funcName) {
         continue
       }
+      const funcObject = _.cloneDeep(services.Resources.default[funcName])
+      funcObject.Name = funcName
+      funcObject.FuncName = this.provider.getFunctionName(funcName)
       const deployFunctionName = this.provider.getFunctionName(funcName)
       outputInformation = outputInformation + `  ${funcName}: ${deployFunctionName}\n`
       functionInformation = await func.getFunction('default', deployFunctionName, false)
       if (functionInformation.Triggers && functionInformation.Triggers.length > 0) {
         for (let i = 0; i <= functionInformation.Triggers.length; i++) {
+          if ((await func.checkStatus('default', funcObject)) == false) {
+            throw `Function ${funcObject.FuncName} create/update failed`
+          }
           const thisTrigger = functionInformation.Triggers[i]
           try {
             if (thisTrigger.Type == 'apigw') {
diff --git a/deploy/tencentDeployFunction.js b/deploy/tencentDeployFunction.js
index efe9de4..01ed6f2 100644
--- a/deploy/tencentDeployFunction.js
+++ b/deploy/tencentDeployFunction.js
@@ -32,17 +32,7 @@ class TencentDeployFunction {
 
   async deploy() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
 
     const services = this.provider.getServiceResource()
@@ -89,25 +79,17 @@ class TencentDeployFunction {
     const oldFunc = await func.deploy('default', funcObject)
     this.serverless.cli.log(`Created function ${funcObject.FuncName}`)
 
+    if ((await func.checkStatus('default', funcObject)) == false) {
+      throw `Function ${funcObject.FuncName} create/update failed`
+    }
+
     this.serverless.cli.log(`Updating configure for function ${funcObject.FuncName}`)
     await func.updateConfiguration('default', oldFunc, funcObject)
 
     this.serverless.cli.log(`Setting tags for function ${funcObject.FuncName}`)
     await func.createTags('default', funcObject.FuncName, funcObject.Properties.Tags)
 
-    // Function status
-    let status = 'Updating'
-    let times = 90
-    while (status == 'Updating' || status == 'Creating') {
-      const tempFunc = await func.getFunction('default', funcObject.FuncName)
-      status = tempFunc.Status
-      await utils.sleep(1000)
-      times = times - 1
-      if (times <= 0) {
-        throw `Function ${funcObject.FuncName} create/update failed`
-      }
-    }
-    if (status != 'Active') {
+    if ((await func.checkStatus('default', funcObject)) == false) {
       throw `Function ${funcObject.FuncName} create/update failed`
     }
 
@@ -148,6 +130,9 @@ class TencentDeployFunction {
     const functionInformation = await func.getFunction('default', deployFunctionName, false)
     if (functionInformation.Triggers && functionInformation.Triggers.length > 0) {
       for (let i = 0; i <= functionInformation.Triggers.length; i++) {
+        if ((await func.checkStatus('default', funcObject)) == false) {
+          throw `Function ${funcObject.FuncName} create/update failed`
+        }
         const thisTrigger = functionInformation.Triggers[i]
         try {
           if (thisTrigger.Type == 'apigw') {
diff --git a/deploy/tencentDeployList.js b/deploy/tencentDeployList.js
index 6e3b8fa..4484548 100644
--- a/deploy/tencentDeployList.js
+++ b/deploy/tencentDeployList.js
@@ -24,18 +24,9 @@ class TencentDeployList {
 
   async serviceList() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
+
     const Handler = new RollbackService(this.options, this.serverless)
     const fileKeyPrefix = this.serverless.service.service + '-' + this.options.stage
     const cosBucket = this.provider.getDeployCosBucket()
diff --git a/deploy/tencentDeployListFunctions.js b/deploy/tencentDeployListFunctions.js
index ee1b972..3ae3335 100644
--- a/deploy/tencentDeployListFunctions.js
+++ b/deploy/tencentDeployListFunctions.js
@@ -26,18 +26,9 @@ class TencentDeployListFunction {
 
   async functionList() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
+
     try {
       const infoHandler = new InfoFunction(this.options, this.serverless)
       const deployHandler = new ListFunctions(this.options, this.serverless)
diff --git a/index.js b/index.js
index feb1846..8aa36de 100755
--- a/index.js
+++ b/index.js
@@ -27,7 +27,6 @@ class TencentIndex {
     this.serverless.pluginManager.addPlugin(TencentInfo)
     this.serverless.pluginManager.addPlugin(TencentLogs)
   }
-
 }
 
 module.exports = TencentIndex
diff --git a/info/tencentInfo.js b/info/tencentInfo.js
index 27aae16..380d0a8 100644
--- a/info/tencentInfo.js
+++ b/info/tencentInfo.js
@@ -25,17 +25,7 @@ class TencentInfo {
 
   async info() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
     try {
       const region = this.options.region
diff --git a/invoke/tencentInvoke.js b/invoke/tencentInvoke.js
index c890338..0ac662f 100644
--- a/invoke/tencentInvoke.js
+++ b/invoke/tencentInvoke.js
@@ -24,22 +24,9 @@ class TencentInvoke {
 
   async invoke() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
     try {
-      const options = {
-        region: this.options.region
-      }
       const invokeHandler = new Invoke(this.options, this.serverless)
       let context = null
       if (this.options.data) {
diff --git a/logs/tencentLogs.js b/logs/tencentLogs.js
index 9a050ac..f9a9e3b 100644
--- a/logs/tencentLogs.js
+++ b/logs/tencentLogs.js
@@ -50,17 +50,7 @@ class TencentLogs {
 
   async logs() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
     try {
       const timeFormat = 'yyyy-MM-dd hh:mm:ss'
diff --git a/metrics/tencentMetrics.js b/metrics/tencentMetrics.js
index b3eee65..2ba4723 100644
--- a/metrics/tencentMetrics.js
+++ b/metrics/tencentMetrics.js
@@ -58,17 +58,7 @@ class TencentInfo {
 
   async metrics() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
     try {
       const Handler = new MetricsFunction(this.options, this.serverless)
diff --git a/package.json b/package.json
index cc6387d..bbdc032 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "serverless-tencent-scf",
-  "version": "0.1.22",
+  "version": "0.1.37",
   "description": "Provider plugin for the Serverless Framework v1.x which adds support for Tencent Cloud Functions.",
   "main": "index.js",
   "author": "Tencent Cloud, Inc.",
@@ -44,7 +44,8 @@
     "tencentcloud-sdk-nodejs": "^3.0.87",
     "universal-analytics": "^0.4.20",
     "tencent-login": "^0.1.6",
-    "serverless-tencent-auth-tool": "^1.0.0"
+    "serverless-tencent-tools": "^0.0.11",
+    "serverless-tencent-auth-tool": "^1.0.18"
   },
   "devDependencies": {
     "coveralls": "^3.0.5",
diff --git a/provider/tencentProvider.js b/provider/tencentProvider.js
index 8c9861f..3cb97e7 100644
--- a/provider/tencentProvider.js
+++ b/provider/tencentProvider.js
@@ -7,11 +7,14 @@ const util = require('util')
 const QRCode = require('qrcode')
 const TencentLogin = require('tencent-login')
 const tencentcloud = require('tencentcloud-sdk-nodejs')
-const { GetUserAuthInfo } = require('serverless-tencent-tools').Account
+const serverlessTencentTools = require('serverless-tencent-tools')
+const { GetUserAuthInfo } = serverlessTencentTools.Account
+const { DataReport } = serverlessTencentTools.Others.DataReport
 const ClientProfile = require('tencentcloud-sdk-nodejs/tencentcloud/common/profile/client_profile.js')
 const HttpProfile = require('tencentcloud-sdk-nodejs/tencentcloud/common/profile/http_profile.js')
 const AbstractModel = require('tencentcloud-sdk-nodejs/tencentcloud/common/abstract_model')
 const AbstractClient = require('tencentcloud-sdk-nodejs/tencentcloud/common/abstract_client')
+
 const constants = {
   providerName: 'tencent'
 }
@@ -50,18 +53,59 @@ class TencentProvider {
     this.getCredentials(this.serverless, this.options)
     this.serverless.setProvider(constants.providerName, this)
     this.provider = this
+    let commands = ''
+    const commandsAttr = this.serverless.pluginManager.cliCommands
+    for (let i = 0; i < commandsAttr.length; i++) {
+      commands = commands + (i == 0 ? '' : '_') + commandsAttr[i]
+    }
+    this.reportInputs = {
+      name: 'serverless-tencent-scf',
+      project: this.serverless.service.service,
+      action: commands
+    }
+    try {
+      new DataReport().report(this.reportInputs)
+    } catch (e) {}
   }
 
   static getProviderName() {
     return constants.providerName
   }
 
+  async getUserCred(options) {
+    if (!options.credentials || !options.credentials.tencent_secret_id) {
+      const tencentTemp = await this.getTempKey()
+      this.options.credentials = {
+        tencent_secret_id: tencentTemp.tencent_secret_id,
+        tencent_secret_key: tencentTemp.tencent_secret_key,
+        tencent_appid: tencentTemp.tencent_appid,
+        tencent_owneruin: tencentTemp.tencent_owneruin
+      }
+      options.token = tencentTemp.token
+      options.timestamp = tencentTemp.timestamp
+    }
+    if (!options.credentials.tencent_owneruin || !options.credentials.tencent_appid) {
+      const appid = await this.getAppid({
+        SecretId: options.credentials.tencent_secret_id,
+        SecretKey: options.credentials.tencent_secret_key
+      })
+      options.credentials.tencent_appid = appid.AppId
+      options.credentials.tencent_owneruin = appid.OwnerUin
+      this.tempUin = appid.OwnerUin
+    }
+    return options
+  }
+
   async getUserAuth(uin) {
     try {
+      try {
+        this.reportInputs.uin = uin
+        new DataReport().report(this.reportInputs)
+      } catch (e) {}
       const getUserAuthInfo = new GetUserAuthInfo()
-      const result = await getUserAuthInfo.isAuth(uin)
+      const result = await getUserAuthInfo.isAuth(uin, this.reportInputs)
       if (result['Error'] == true) {
-        console.log('Failed to get real name authentication result.')
+        console.log('未获取到实名认证结果，请重试。')
         process.exit(-1)
       } else {
         if (result['Message']['Authentication'] == 1) {
@@ -69,15 +113,15 @@ class TencentProvider {
         }
         const verifyUrl = 'https://cloud.tencent.com/verify/identity'
         console.log(
-          "You don't have real name authentication yet. You can open the url or scan QR code for real name authentication."
+          '系统检测您还未进行实名认证，请您扫描二下方二维码或者进入下方的地址，进行实名认证，实名认证之后可重新操作。'
         )
-        console.log('Real name authentication url: ')
-        console.log(verifyUrl)
-        console.log('Real name authentication QR code: ')
+        console.log('实名认证地址: ')
+        console.log('https://console.cloud.tencent.com/developer/auth')
+        console.log('实名认证二维码: ')
         QRCode.toString(verifyUrl, { type: 'terminal' }, function(err, url) {
           console.log(url)
         })
-        console.log('Please re operate after real name authentication.')
+        console.log('请实名认证之后，重新执行本次操作。')
         process.exit(-1)
       }
     } catch (e) {
@@ -290,14 +334,12 @@ class TencentProvider {
         }
       })
       // From cam to getting appid
-      if (!this.options.credentials.tencent_appid) {
-        const appid = await this.getAppid({
-          SecretId: this.options.credentials.tencent_secret_id,
-          SecretKey: this.options.credentials.tencent_secret_key
-        })
-        this.options.credentials.tencent_appid = appid.AppId
-        this.options.credentials.tencent_owneruin = appid.OwnerUin
-      }
+      const appid = await this.getAppid({
+        SecretId: this.options.credentials.tencent_secret_id,
+        SecretKey: this.options.credentials.tencent_secret_key
+      })
+      this.options.credentials.tencent_appid = appid.AppId
+      this.options.credentials.tencent_owneruin = appid.OwnerUin
     } catch (e) {}
     return
   }
diff --git a/remove/tencentRemove.js b/remove/tencentRemove.js
index 4d41a8d..8b19884 100644
--- a/remove/tencentRemove.js
+++ b/remove/tencentRemove.js
@@ -25,17 +25,7 @@ class TencentRemove {
 
   async remove() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
     try {
       const handler = new RemoveFunction(this.options, this.serverless)
diff --git a/rollback/tencentRollback.js b/rollback/tencentRollback.js
index 9c6c7e1..440156a 100644
--- a/rollback/tencentRollback.js
+++ b/rollback/tencentRollback.js
@@ -27,17 +27,7 @@ class TencentRollback {
 
   async rollback() {
     const provider = new tencentProvider(this.serverless, this.options)
-    if (!this.options.credentials || !this.options.credentials.tencent_secret_id) {
-      const tencentTemp = await provider.getTempKey()
-      this.options.credentials = {
-        tencent_secret_id: tencentTemp.tencent_secret_id,
-        tencent_secret_key: tencentTemp.tencent_secret_key,
-        tencent_appid: tencentTemp.tencent_appid,
-        tencent_owneruin: tencentTemp.tencent_owneruin
-      }
-      this.options.token = tencentTemp.token
-      this.options.timestamp = tencentTemp.timestamp
-    }
+    this.options = await provider.getUserCred(this.options)
     await provider.getUserAuth(this.options.credentials.tencent_owneruin)
     const Handler = new RollbackService(this.options, this.serverless)
     const fileKeyPrefix = this.serverless.service.service + '-' + this.options.stage
@@ -98,9 +88,17 @@ class TencentRollback {
               const oldFunc = await func.deploy('default', funcObject)
               this.serverless.cli.log(`Rollback function ${funcObject.FuncName}`)
 
+              if ((await func.checkStatus('default', funcObject)) == false) {
+                throw `Function ${funcObject.FuncName} create/update failed`
+              }
+
               this.serverless.cli.log(`Rollback configure for function ${funcObject.FuncName}`)
               await func.updateConfiguration('default', oldFunc, funcObject)
 
+              if ((await func.checkStatus('default', funcObject)) == false) {
+                throw `Function ${funcObject.FuncName} create/update failed`
+              }
+
               this.serverless.cli.log(`Setting tags for function ${funcObject.FuncName}`)
               await func.createTags('default', funcObject.FuncName, funcObject.Properties.Tags)
 
diff --git a/shared/handler.js b/shared/handler.js
index c352978..149db09 100644
--- a/shared/handler.js
+++ b/shared/handler.js
@@ -11,7 +11,6 @@ const MonitorClinet = tencentcloud.monitor.v20180724.Client
 
 class AbstractHandler {
   constructor(options, serverless) {
-
     const { credentials, region } = options
     const { tencent_appid, tencent_secret_id, tencent_secret_key } = credentials
     this.options = options
@@ -98,26 +97,17 @@ class AbstractHandler {
     const chunkSize = options.chunkSize || 1024 * 1024 * 8
     const timeout = options.timeout || 120
 
-    if (!options.token) {
-      return new tencentcloudCos({
-        SecretId: secret_id,
-        SecretKey: secret_key,
-        FileParallelLimit: fileParallelLimit,
-        ChunkParallelLimit: chunkParallelLimit,
-        ChunkSize: chunkSize,
-        Timeout: timeout * 1000
-      })
-    }
-
     return new tencentcloudCos({
-      getAuthorization: function(option, callback) {
-        callback({
-          TmpSecretId: secret_id,
-          TmpSecretKey: secret_key,
-          XCosSecurityToken: options.token,
-          ExpiredTime: options.timestamp
-        })
-      }
+      SecretId: secret_id,
+      SecretKey: secret_key,
+      FileParallelLimit: fileParallelLimit,
+      ChunkParallelLimit: chunkParallelLimit,
+      ChunkSize: chunkSize,
+      Timeout: timeout * 1000,
+      TmpSecretId: secret_id,
+      TmpSecretKey: secret_key,
+      XCosSecurityToken: options.token,
+      ExpiredTime: options.timestamp
     })
   }
 
