propro-utils 1.3.48 → 1.4.0
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
|
@@ -115,7 +115,7 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
115
115
|
redirectUri
|
|
116
116
|
);
|
|
117
117
|
|
|
118
|
-
await checkIfUserExists(userSchema, account.accountId);
|
|
118
|
+
const user = await checkIfUserExists(userSchema, account.accountId);
|
|
119
119
|
|
|
120
120
|
const currentDateTime = new Date();
|
|
121
121
|
|
|
@@ -138,6 +138,10 @@ function proproAuthMiddleware(options = {}, userSchema) {
|
|
|
138
138
|
maxAge: accessMaxAge,
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
+
res.cookie('user', JSON.stringify(user));
|
|
142
|
+
|
|
143
|
+
res.cookie('account', JSON.stringify(account));
|
|
144
|
+
|
|
141
145
|
const urlToRedirect = `http://${redirectUrl}/`;
|
|
142
146
|
|
|
143
147
|
return res.redirect(urlToRedirect);
|