@ruiapp/rapid-core 0.9.4 → 0.9.5

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.
package/dist/index.js CHANGED
@@ -7325,7 +7325,7 @@ class AuthPlugin {
7325
7325
  try {
7326
7326
  const secretKey = Buffer.from(server.config.jwtKey, "base64");
7327
7327
  const tokenPayload = verifyJwt(token, secretKey);
7328
- routeContext.state.userId = tokenPayload.aud;
7328
+ routeContext.state.userId = Number(tokenPayload.aud);
7329
7329
  routeContext.state.userLogin = tokenPayload.act;
7330
7330
  }
7331
7331
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruiapp/rapid-core",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -91,7 +91,7 @@ class AuthPlugin implements RapidPlugin {
91
91
  try {
92
92
  const secretKey = Buffer.from(server.config.jwtKey, "base64");
93
93
  const tokenPayload = verifyJwt(token, secretKey);
94
- routeContext.state.userId = tokenPayload.aud as string;
94
+ routeContext.state.userId = Number(tokenPayload.aud as string);
95
95
  routeContext.state.userLogin = tokenPayload.act as string;
96
96
  } catch (error) {
97
97
  const logger = server.getLogger();