propro-utils 1.7.6 → 1.7.8

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.6",
3
+ "version": "1.7.8",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -173,24 +173,30 @@ const setAuthCookies = async (res, tokens, account, user, appUrl) => {
173
173
  }
174
174
  );
175
175
 
176
- const extensionCookiePromises = Object.entries({
177
- ...httpOnlyCookies,
178
- ...regularCookies,
179
- }).map(([name, config]) => {
180
- return setChromeExtensionCookie({
181
- url: `https://${domain || 'propro.so'}`,
182
- name,
183
- value: config.value,
184
- secure: true,
185
- httpOnly: !!config.httpOnly,
186
- sameSite: 'no_restriction',
187
- path: '/',
188
- expirationDate: Math.floor((Date.now() + config.maxAge) / 1000),
189
- domain: domain?.startsWith('.') ? domain : `.${domain || 'propro.so'}`,
190
- });
191
- });
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
+ // });
192
198
 
193
- await Promise.allSettled(extensionCookiePromises);
199
+ // await Promise.allSettled(extensionCookiePromises);
194
200
 
195
201
  console.log('Auth cookies set successfully', {
196
202
  domain,