propro-utils 1.4.55 → 1.4.56
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
package/src/server/index.js
CHANGED
|
@@ -113,9 +113,6 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
113
113
|
return res.status(400).send('No code received');
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
console.log('code: ', code);
|
|
117
|
-
console.log('redirectUri: ', redirectUri);
|
|
118
|
-
|
|
119
116
|
const { tokens, account, redirectUrl } = await exchangeToken(
|
|
120
117
|
authUrl,
|
|
121
118
|
code,
|
|
@@ -124,8 +121,6 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
124
121
|
redirectUri
|
|
125
122
|
);
|
|
126
123
|
|
|
127
|
-
console.log('tokens: ', tokens);
|
|
128
|
-
|
|
129
124
|
const user = await checkIfUserExists(userSchema, account.accountId);
|
|
130
125
|
|
|
131
126
|
setAuthCookies(res, tokens, account, user, redirectUrl);
|
|
@@ -19,7 +19,7 @@ const setAuthCookies = (res, tokens, account, user, appUrl) => {
|
|
|
19
19
|
secure: process.env.NODE_ENV === 'production',
|
|
20
20
|
// sameSite: 'Strict',
|
|
21
21
|
// path: '/',
|
|
22
|
-
domain:
|
|
22
|
+
domain: appUrl ? new URL(appUrl).hostname : undefined,
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
res.cookie('x-refresh-token', tokens.refresh.token, {
|