propro-utils 1.4.33 → 1.4.35
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 +8 -14
package/package.json
CHANGED
package/src/server/index.js
CHANGED
|
@@ -151,24 +151,18 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
151
151
|
maxAge: accessMaxAge,
|
|
152
152
|
});
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
// res.cookie('account', JSON.stringify(account), {
|
|
159
|
-
// maxAge: accessMaxAge,
|
|
160
|
-
// });
|
|
161
|
-
|
|
162
|
-
// req.cookie('isLoggedIn', true, {
|
|
163
|
-
// maxAge: accessMaxAge,
|
|
164
|
-
// });
|
|
154
|
+
res.cookie('user', JSON.stringify(user), {
|
|
155
|
+
maxAge: accessMaxAge,
|
|
156
|
+
secure: process.env.NODE_ENV === 'production',
|
|
157
|
+
});
|
|
165
158
|
|
|
166
|
-
|
|
159
|
+
res.cookie('account', JSON.stringify(account), {
|
|
160
|
+
maxAge: accessMaxAge,
|
|
161
|
+
secure: process.env.NODE_ENV === 'production',
|
|
162
|
+
});
|
|
167
163
|
|
|
168
164
|
const urlToRedirect = formatRedirectUrl(redirectUrl);
|
|
169
165
|
|
|
170
|
-
console.log('urlToRedirect', urlToRedirect);
|
|
171
|
-
|
|
172
166
|
return res.redirect(urlToRedirect);
|
|
173
167
|
}
|
|
174
168
|
} catch (error) {
|