propro-utils 1.4.31 → 1.4.32
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
|
@@ -128,16 +128,7 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
128
128
|
redirectUri
|
|
129
129
|
);
|
|
130
130
|
|
|
131
|
-
console.log(
|
|
132
|
-
'tokens',
|
|
133
|
-
tokens,
|
|
134
|
-
'account',
|
|
135
|
-
account,
|
|
136
|
-
'redirectUrl',
|
|
137
|
-
redirectUrl
|
|
138
|
-
);
|
|
139
131
|
const user = await checkIfUserExists(userSchema, account.accountId);
|
|
140
|
-
console.log('user', user);
|
|
141
132
|
|
|
142
133
|
const currentDateTime = new Date();
|
|
143
134
|
|
|
@@ -160,15 +151,6 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
160
151
|
maxAge: accessMaxAge,
|
|
161
152
|
});
|
|
162
153
|
|
|
163
|
-
console.log(
|
|
164
|
-
'user',
|
|
165
|
-
user,
|
|
166
|
-
'account',
|
|
167
|
-
account,
|
|
168
|
-
'redirectUrl',
|
|
169
|
-
redirectUrl
|
|
170
|
-
);
|
|
171
|
-
|
|
172
154
|
res.cookie('user', JSON.stringify(user), {
|
|
173
155
|
maxAge: accessMaxAge,
|
|
174
156
|
});
|
|
@@ -181,8 +163,12 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
181
163
|
maxAge: accessMaxAge,
|
|
182
164
|
});
|
|
183
165
|
|
|
166
|
+
console.log('redirectUrl', redirectUrl);
|
|
167
|
+
|
|
184
168
|
const urlToRedirect = formatRedirectUrl(redirectUrl);
|
|
185
169
|
|
|
170
|
+
console.log('urlToRedirect', urlToRedirect);
|
|
171
|
+
|
|
186
172
|
return res.redirect(urlToRedirect);
|
|
187
173
|
}
|
|
188
174
|
} catch (error) {
|