propro-utils 1.4.31 → 1.4.33
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,29 +151,24 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
160
151
|
maxAge: accessMaxAge,
|
|
161
152
|
});
|
|
162
153
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
'account',
|
|
167
|
-
account,
|
|
168
|
-
'redirectUrl',
|
|
169
|
-
redirectUrl
|
|
170
|
-
);
|
|
154
|
+
// res.cookie('user', JSON.stringify(user), {
|
|
155
|
+
// maxAge: accessMaxAge,
|
|
156
|
+
// });
|
|
171
157
|
|
|
172
|
-
res.cookie('
|
|
173
|
-
|
|
174
|
-
});
|
|
158
|
+
// res.cookie('account', JSON.stringify(account), {
|
|
159
|
+
// maxAge: accessMaxAge,
|
|
160
|
+
// });
|
|
175
161
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
});
|
|
162
|
+
// req.cookie('isLoggedIn', true, {
|
|
163
|
+
// maxAge: accessMaxAge,
|
|
164
|
+
// });
|
|
179
165
|
|
|
180
|
-
|
|
181
|
-
maxAge: accessMaxAge,
|
|
182
|
-
});
|
|
166
|
+
console.log('redirectUrl', redirectUrl);
|
|
183
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) {
|