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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "propro-utils",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -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
- ...httpOnlyCookies,
178
- ...regularCookies,
179
- }).map(([name, config]) => {
180
- if(chrome?.cookies?.set)
181
- return setChromeExtensionCookie({
182
- url: `https://${domain || 'propro.so'}`,
183
- name,
184
- value: config.value,
185
- secure: true,
186
- httpOnly: !!config.httpOnly,
187
- sameSite: 'no_restriction',
188
- path: '/',
189
- expirationDate: Math.floor((Date.now() + config.maxAge) / 1000),
190
- domain: domain?.startsWith('.') ? domain : `.${domain || 'propro.so'}`,
191
- });
192
- return res.cookie(name, config.value, {
193
- ...commonAttributes,
194
- ...config,
195
- url: `https://${domain || 'propro.so'}`,
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,