@nocobase/auth 1.6.0-beta.17 → 1.6.0-beta.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/base/auth.js +6 -0
  2. package/package.json +7 -7
package/lib/base/auth.js CHANGED
@@ -117,6 +117,12 @@ const _BaseAuth = class _BaseAuth extends import_auth.Auth {
117
117
  raw: true
118
118
  })
119
119
  ) : null;
120
+ if (!user) {
121
+ this.ctx.throw(401, {
122
+ message: this.ctx.t("User not found. Please sign in again to continue.", { ns: localeNamespace }),
123
+ code: import_auth.AuthErrorCode.NOT_EXIST_USER
124
+ });
125
+ }
120
126
  if (roleName) {
121
127
  this.ctx.headers["x-role"] = roleName;
122
128
  }
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@nocobase/auth",
3
- "version": "1.6.0-beta.17",
3
+ "version": "1.6.0-beta.19",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0",
6
6
  "main": "./lib/index.js",
7
7
  "types": "./lib/index.d.ts",
8
8
  "dependencies": {
9
- "@nocobase/actions": "1.6.0-beta.17",
10
- "@nocobase/cache": "1.6.0-beta.17",
11
- "@nocobase/database": "1.6.0-beta.17",
12
- "@nocobase/resourcer": "1.6.0-beta.17",
13
- "@nocobase/utils": "1.6.0-beta.17",
9
+ "@nocobase/actions": "1.6.0-beta.19",
10
+ "@nocobase/cache": "1.6.0-beta.19",
11
+ "@nocobase/database": "1.6.0-beta.19",
12
+ "@nocobase/resourcer": "1.6.0-beta.19",
13
+ "@nocobase/utils": "1.6.0-beta.19",
14
14
  "@types/jsonwebtoken": "^8.5.8",
15
15
  "jsonwebtoken": "^8.5.1"
16
16
  },
@@ -19,5 +19,5 @@
19
19
  "url": "git+https://github.com/nocobase/nocobase.git",
20
20
  "directory": "packages/auth"
21
21
  },
22
- "gitHead": "f431f7c589bcefd6dcda19a0119a85b0aa192b05"
22
+ "gitHead": "3d63b81ba99b4c9c30fbf9ad879c675281d28c28"
23
23
  }