diff --git a/auth/index.js b/auth/index.js index 1f5c6ce..d428821 100644 --- a/auth/index.js +++ b/auth/index.js @@ -69,7 +69,7 @@ AuthToken.prototype.getTokenData = async function (userToken) { return tokenData; }; -AuthToken.prototype.checkTokenKoaRequest = async function (ctx, userkey, checkKey, next) { +AuthToken.prototype.checkTokenKoaRequest = async function (ctx, next) { let token = ctx.request.body.token if (!token) token = ctx.header['authorization'] if (!token) token = token = ctx.header['token'] @@ -81,7 +81,7 @@ AuthToken.prototype.checkTokenKoaRequest = async function (ctx, userkey, checkKe return; } - let tokenData = await this.checkToken(token, userkey, checkKey); + let tokenData = await this.checkToken(token, ""); if (!ret) { ctx.body = { result: 'fail', error: { code: 401, msg: 'User token error.' }, data: {} diff --git a/auth/package.json b/auth/package.json index 5678bec..257cd5b 100644 --- a/auth/package.json +++ b/auth/package.json @@ -1,6 +1,6 @@ { "name": "@ehason/auth", - "version": "1.3.0", + "version": "1.3.1", "description": "User auth lib", "main": "index.js", "scripts": {