propro-utils 1.4.1 → 1.4.2

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.1",
3
+ "version": "1.4.2",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -51,11 +51,13 @@ function proproAuthMiddleware(options = {}, userSchema) {
51
51
  const refreshToken = req.cookies['x-refresh-token'];
52
52
  console.log('refreshToken', refreshToken);
53
53
  if (!refreshToken) {
54
+ console.log('No refresh token provided');
54
55
  const authClientUrl = `${clientUrl}/signin`;
55
56
  const redirectUrl = `${authClientUrl}?response_type=code&appName=${appName}&client_id=${clientId}&redirect_uri=${encodeURIComponent(
56
57
  redirectUri
57
58
  )}`;
58
- return res
59
+ console.log('redirectUrl', redirectUrl);
60
+ res
59
61
  .status(401)
60
62
  .json({redirectUrl, error: 'No refresh token provided'});
61
63
  }