powr-sdk-api 2.3.4 → 2.3.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.
@@ -7,7 +7,8 @@ const {
7
7
  const config = require('../config');
8
8
  const generateJWTToken = user => {
9
9
  return jwt.sign({
10
- userId: user._id
10
+ userId: user._id,
11
+ fullName: user.fullName
11
12
  }, config.jwtToken, {
12
13
  expiresIn: '24h'
13
14
  });
@@ -34,7 +35,9 @@ const verifyToken = async (req, res, next) => {
34
35
 
35
36
  // Attach user info to request object
36
37
  req.user = {
37
- powrId: decoded.userId // powr-base user ID
38
+ powrId: decoded.userId,
39
+ // powr-base user ID
40
+ fullName: decoded.fullName // User's full name
38
41
  };
39
42
  console.log("Authenticated user:", {
40
43
  powrId: req.user.powrId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powr-sdk-api",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "Shared API core library for PowrStack projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",