propro-utils 1.4.21 → 1.4.22

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.4.21",
3
+ "version": "1.4.22",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -107,7 +107,6 @@ function proproAuthMiddleware(options = {}, userSchema) {
107
107
  return res.status(400).send('No code received');
108
108
  }
109
109
 
110
- console.log('code', code);
111
110
  const {tokens, account, redirectUrl} = await exchangeToken(
112
111
  authUrl,
113
112
  code,
@@ -116,9 +115,7 @@ function proproAuthMiddleware(options = {}, userSchema) {
116
115
  redirectUri
117
116
  );
118
117
 
119
- console.log('tokens', tokens);
120
118
  const user = await checkIfUserExists(userSchema, account.accountId);
121
- console.log('user', user);
122
119
 
123
120
  const currentDateTime = new Date();
124
121
 
@@ -149,11 +146,9 @@ function proproAuthMiddleware(options = {}, userSchema) {
149
146
 
150
147
  res.cookie('account', JSON.stringify(account));
151
148
 
152
- console.log('redirectUrl', redirectUrl);
153
149
 
154
- const urlToRedirect = formatRedirectUrl(clientUrl);
150
+ const urlToRedirect = formatRedirectUrl(redirectUrl);
155
151
 
156
- console.log('urlToRedirect', urlToRedirect);
157
152
 
158
153
  return res.redirect(urlToRedirect);
159
154
  }