propro-utils 1.7.7 → 1.7.9
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
|
@@ -160,6 +160,7 @@ const setAuthCookies = async (res, tokens, account, user, appUrl) => {
|
|
|
160
160
|
Object.entries({ ...httpOnlyCookies, ...regularCookies }).forEach(
|
|
161
161
|
([name, config]) => {
|
|
162
162
|
try{
|
|
163
|
+
console.log('Setting cookie:', {name, value: config.value})
|
|
163
164
|
res.cookie(name, config.value, {
|
|
164
165
|
...commonAttributes,
|
|
165
166
|
...config,
|
|
@@ -173,30 +174,30 @@ const setAuthCookies = async (res, tokens, account, user, appUrl) => {
|
|
|
173
174
|
}
|
|
174
175
|
);
|
|
175
176
|
|
|
176
|
-
const extensionCookiePromises = Object.entries({
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}).map(([name, config]) => {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
});
|
|
177
|
+
// const extensionCookiePromises = Object.entries({
|
|
178
|
+
// ...httpOnlyCookies,
|
|
179
|
+
// ...regularCookies,
|
|
180
|
+
// }).map(([name, config]) => {
|
|
181
|
+
// if(chrome?.cookies?.set)
|
|
182
|
+
// return setChromeExtensionCookie({
|
|
183
|
+
// url: `https://${domain || 'propro.so'}`,
|
|
184
|
+
// name,
|
|
185
|
+
// value: config.value,
|
|
186
|
+
// secure: true,
|
|
187
|
+
// httpOnly: !!config.httpOnly,
|
|
188
|
+
// sameSite: 'no_restriction',
|
|
189
|
+
// path: '/',
|
|
190
|
+
// expirationDate: Math.floor((Date.now() + config.maxAge) / 1000),
|
|
191
|
+
// domain: domain?.startsWith('.') ? domain : `.${domain || 'propro.so'}`,
|
|
192
|
+
// });
|
|
193
|
+
// return res.cookie(name, config.value, {
|
|
194
|
+
// ...commonAttributes,
|
|
195
|
+
// ...config,
|
|
196
|
+
// url: `https://${domain || 'propro.so'}`,
|
|
197
|
+
// });
|
|
198
|
+
// });
|
|
198
199
|
|
|
199
|
-
await Promise.allSettled(extensionCookiePromises);
|
|
200
|
+
// await Promise.allSettled(extensionCookiePromises);
|
|
200
201
|
|
|
201
202
|
console.log('Auth cookies set successfully', {
|
|
202
203
|
domain,
|