propro-utils 1.4.87 → 1.4.88

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.4.87",
3
+ "version": "1.4.88",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -10,7 +10,7 @@ const {
10
10
  const { checkIfUserExists } = require('../../middlewares/account_info');
11
11
  const authValidation = require('../../middlewares/access_token');
12
12
  const axios = require('axios');
13
- const { Router } = require('express');
13
+ const { Router, query } = require('express');
14
14
 
15
15
  /**
16
16
  * Middleware for handling authentication and authorization.
@@ -335,9 +335,13 @@ class AuthMiddleware {
335
335
  const formattedAuthUrl = formatRedirectUrl(this.options.authUrl);
336
336
  return axios({
337
337
  method: req.method,
338
- url: `${formattedAuthUrl}${path}&clientId=${this.options.clientId}&redirectUri=${this.options.redirectUri}`,
338
+ url: `${formattedAuthUrl}${path}`,
339
339
  data: req.body,
340
340
  headers: headers,
341
+ query: {
342
+ clientId: this.options.clientId,
343
+ redirectUri: this.options.redirectUri,
344
+ },
341
345
  });
342
346
  };
343
347