propro-utils 1.5.40 → 1.5.42

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.5.40",
3
+ "version": "1.5.42",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -80,10 +80,7 @@ class AuthMiddleware {
80
80
  const { returnTokens } = req.query;
81
81
 
82
82
  try {
83
- const response = await this.proxyToAuthServer(
84
- req,
85
- `/api/v1/auth/login?returnTokens=${returnTokens}`
86
- );
83
+ const response = await this.proxyToAuthServer(req, `/api/v1/auth/login`);
87
84
 
88
85
  const { account, tokens } = response.data;
89
86
  console.log('account:', account);
@@ -228,7 +225,7 @@ class AuthMiddleware {
228
225
  };
229
226
 
230
227
  refreshTokens = async refreshToken => {
231
- const formattedAuthUrl = formatRedirectUrl('localhost:8182');
228
+ const formattedAuthUrl = formatRedirectUrl(this.options.authUrl);
232
229
  return axios.post(
233
230
  `${formattedAuthUrl}/api/v1/auth/refreshTokens`,
234
231
  { refreshToken },