propro-utils 1.5.1 → 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.1",
3
+ "version": "1.5.3",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -77,13 +77,11 @@ class AuthMiddleware {
77
77
  const { returnTokens } = req.query;
78
78
 
79
79
  console.log('returnTokens:', returnTokens);
80
- console.log('email:', email);
81
80
 
82
81
  try {
83
82
  const response = await this.proxyToAuthServer(
84
83
  req,
85
- `/api/v1/auth/login?returnTokens=${returnTokens}`,
86
- req.body
84
+ `/api/v1/auth/login?returnTokens=${returnTokens}`
87
85
  );
88
86
 
89
87
  console.log('response:', JSON.stringify(response.data));
@@ -308,7 +306,6 @@ class AuthMiddleware {
308
306
  '/api/v1/accounts/avatar'
309
307
  );
310
308
 
311
- res.cookie('account', response.data);
312
309
  res.status(response.status).json(response.data);
313
310
  } catch (error) {
314
311
  this.handleProxyError(error, res);
@@ -352,7 +349,7 @@ class AuthMiddleware {
352
349
  let formattedAuthUrl = formatRedirectUrl(this.options.authUrl);
353
350
 
354
351
  if (!accessToken) {
355
- formattedAuthUrl = `${formattedAuthUrl}&clientId=${this.options.clientId}&redirectUri=${this.options.redirectUri}`;
352
+ formattedAuthUrl = `${formattedAuthUrl}${path}?clientId=${this.options.clientId}&redirectUri=${this.options.redirectUri}`;
356
353
  }
357
354
 
358
355
  const data = req.file ? formData : req.body;