propro-utils 1.4.94 → 1.4.95
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 +1 -1
- package/src/server/index.js +6 -2
package/package.json
CHANGED
package/src/server/index.js
CHANGED
|
@@ -333,13 +333,17 @@ class AuthMiddleware {
|
|
|
333
333
|
headers.Authorization = `Bearer ${accessToken}`;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
|
|
336
|
+
let formattedAuthUrl = formatRedirectUrl(this.options.authUrl);
|
|
337
|
+
|
|
338
|
+
if (!accessToken) {
|
|
339
|
+
formattedAuthUrl = `${formattedAuthUrl}&clientId=${this.options.clientId}&redirectUri=${this.options.redirectUri}`;
|
|
340
|
+
}
|
|
337
341
|
|
|
338
342
|
console.log('formattedAuthUrl:', formattedAuthUrl);
|
|
339
343
|
console.log('req.method:', req.method);
|
|
340
344
|
return axios({
|
|
341
345
|
method: req.method,
|
|
342
|
-
url: `${formattedAuthUrl}${path}
|
|
346
|
+
url: `${formattedAuthUrl}${path}`,
|
|
343
347
|
data: req.body,
|
|
344
348
|
headers: headers,
|
|
345
349
|
});
|