propro-utils 1.4.29 → 1.4.30

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.29",
3
+ "version": "1.4.30",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -148,15 +148,19 @@ function proproAuthMiddleware(options = {}, userSchema) {
148
148
  res.cookie('x-access-token', tokens.access.token, {
149
149
  httpOnly: true,
150
150
  secure: process.env.NODE_ENV === 'production',
151
- expires: accessMaxAge,
151
+ maxAge: accessMaxAge,
152
152
  });
153
153
 
154
154
  res.cookie('user', JSON.stringify(user), {
155
- expires: accessMaxAge,
155
+ maxAge: accessMaxAge,
156
156
  });
157
157
 
158
158
  res.cookie('account', JSON.stringify(account), {
159
- expires: accessMaxAge,
159
+ maxAge: accessMaxAge,
160
+ });
161
+
162
+ req.cookie('isLoggedIn', true, {
163
+ maxAge: accessMaxAge,
160
164
  });
161
165
 
162
166
  const urlToRedirect = formatRedirectUrl(redirectUrl);