propro-utils 1.5.2 → 1.5.3

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.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -81,8 +81,7 @@ class AuthMiddleware {
81
81
  try {
82
82
  const response = await this.proxyToAuthServer(
83
83
  req,
84
- `/api/v1/auth/login?returnTokens=${returnTokens}`,
85
- req.body
84
+ `/api/v1/auth/login?returnTokens=${returnTokens}`
86
85
  );
87
86
 
88
87
  console.log('response:', JSON.stringify(response.data));
@@ -350,7 +349,7 @@ class AuthMiddleware {
350
349
  let formattedAuthUrl = formatRedirectUrl(this.options.authUrl);
351
350
 
352
351
  if (!accessToken) {
353
- formattedAuthUrl = `${formattedAuthUrl}&clientId=${this.options.clientId}&redirectUri=${this.options.redirectUri}`;
352
+ formattedAuthUrl = `${formattedAuthUrl}${path}?clientId=${this.options.clientId}&redirectUri=${this.options.redirectUri}`;
354
353
  }
355
354
 
356
355
  const data = req.file ? formData : req.body;