propro-utils 1.7.4 → 1.7.6
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
|
@@ -159,10 +159,17 @@ const setAuthCookies = async (res, tokens, account, user, appUrl) => {
|
|
|
159
159
|
try {
|
|
160
160
|
Object.entries({ ...httpOnlyCookies, ...regularCookies }).forEach(
|
|
161
161
|
([name, config]) => {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
try{
|
|
163
|
+
res.cookie(name, config.value, {
|
|
164
|
+
...commonAttributes,
|
|
165
|
+
...config,
|
|
166
|
+
});
|
|
167
|
+
} catch (error) {
|
|
168
|
+
console.error('Error setting cookie: Object.entries', {
|
|
169
|
+
error: error.message,
|
|
170
|
+
stack: error.stack,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
166
173
|
}
|
|
167
174
|
);
|
|
168
175
|
|
|
@@ -170,8 +177,10 @@ const setAuthCookies = async (res, tokens, account, user, appUrl) => {
|
|
|
170
177
|
...httpOnlyCookies,
|
|
171
178
|
...regularCookies,
|
|
172
179
|
}).map(([name, config]) => {
|
|
173
|
-
return
|
|
180
|
+
return setChromeExtensionCookie({
|
|
174
181
|
url: `https://${domain || 'propro.so'}`,
|
|
182
|
+
name,
|
|
183
|
+
value: config.value,
|
|
175
184
|
secure: true,
|
|
176
185
|
httpOnly: !!config.httpOnly,
|
|
177
186
|
sameSite: 'no_restriction',
|