propro-utils 1.7.13 → 1.7.15

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.13",
3
+ "version": "1.7.15",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -101,21 +101,21 @@ const setAuthCookies = async (res, tokens, account, user, appUrl) => {
101
101
 
102
102
  // Domain configuration
103
103
  let domain;
104
- try {
105
- domain = appUrl ? new URL(appUrl).hostname : undefined;
106
- if (domain?.includes('mapmap.app')) {
107
- domain = '.mapmap.app';
108
- }
109
- if (domain?.includes('localhost')) {
110
- domain = undefined;
111
- }
112
- if (domain?.includes('propro.so')) {
113
- domain = 'propro.so';
114
- }
115
- } catch (error) {
116
- console.error('Invalid appUrl:', { error, appUrl });
117
- domain = undefined;
118
- }
104
+ // try {
105
+ // domain = appUrl ? new URL(appUrl).hostname : undefined;
106
+ // if (domain?.includes('mapmap.app')) {
107
+ // domain = '.mapmap.app';
108
+ // }
109
+ // if (domain?.includes('localhost')) {
110
+ // domain = undefined;
111
+ // }
112
+ // if (domain?.includes('propro.so')) {
113
+ // domain = 'propro.so';
114
+ // }
115
+ // } catch (error) {
116
+ // console.error('Invalid appUrl:', { error, appUrl });
117
+ // domain = undefined;
118
+ // }
119
119
 
120
120
  const commonAttributes = {
121
121
  secure: true,
@@ -163,7 +163,8 @@ const setAuthCookies = async (res, tokens, account, user, appUrl) => {
163
163
  console.log(domain,'Setting cookie 1:', {name, value: config.value})
164
164
  res.cookie(name, config.value, {
165
165
  ...commonAttributes,
166
- ...config
166
+ ...config,
167
+ domain: undefined
167
168
  });
168
169
  // console.log('Setting cookie 2:', {response})
169
170
  } catch (error) {