propro-utils 1.3.41 → 1.3.42

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "propro-utils",
3
- "version": "1.3.41",
3
+ "version": "1.3.42",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -8,7 +8,7 @@ const {post} = require("axios");
8
8
  /**
9
9
  * Middleware for handling authentication and authorization.
10
10
  *
11
- * @param {object} [options={}] - The options for configuring the authentication middleware.
11
+ * @param {object} [options={}] - The options for configuring the auth entication middleware.
12
12
  * @param {string} [options.secret="RESTFULAPIs"] - The secret key used for authentication.
13
13
  * @param {string} [options.authUrl=process.env.AUTH_URL] - The authentication URL.
14
14
  * @param {string} [options.clientId=process.env.CLIENT_ID] - The client ID.
@@ -45,7 +45,9 @@ function proproAuthMiddleware(options = {}, userSchema) {
45
45
  }
46
46
 
47
47
  if (req.path === "/api/refreshToken") {
48
+ console.log("refresh token");
48
49
  const refreshToken = req.cookies["x-refresh-token"];
50
+ console.log("refreshToken", refreshToken);
49
51
  if (!refreshToken) {
50
52
  const authClientUrl = `${clientUrl}/signin`;
51
53
  const redirectUrl = `${authClientUrl}?response_type=code&appName=${appName}&client_id=${clientId}&redirect_uri=${encodeURIComponent(
@@ -62,6 +64,10 @@ function proproAuthMiddleware(options = {}, userSchema) {
62
64
  }
63
65
  });
64
66
 
67
+ console.log("accountData", accountData);
68
+ console.log("access", access);
69
+ console.log("refresh", refresh);
70
+
65
71
 
66
72
  const currentDateTime = new Date();
67
73