propro-utils 1.4.69 → 1.4.70

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.69",
3
+ "version": "1.4.70",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -132,7 +132,14 @@ function proproAuthMiddleware(options = {}, userSchema) {
132
132
 
133
133
  const urlToRedirect = formatRedirectUrl(redirectUrl);
134
134
 
135
- return res.redirect(urlToRedirect);
135
+ // return res.redirect(urlToRedirect);
136
+
137
+ return res
138
+ .status(200)
139
+ .json({
140
+ message: 'Token received successfully',
141
+ redirectUrl: urlToRedirect,
142
+ });
136
143
  }
137
144
  } catch (error) {
138
145
  console.log('Unauthorized: ', error.message);