mitra-interactions-sdk 1.0.60-beta.8 → 1.0.60-beta.9
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/dist/index.js +5 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -449,13 +449,11 @@ async function emailLoginMitra2(options) {
|
|
|
449
449
|
});
|
|
450
450
|
const response = {
|
|
451
451
|
token: data.token,
|
|
452
|
-
// baseURL = authUrl
|
|
453
|
-
//
|
|
454
|
-
// (quebra no F5 quando o app persiste). authUrl e baseURL são o mesmo gateway.
|
|
452
|
+
// baseURL = authUrl (o gateway configurado). O BFF não devolve baseURL/integrationURL;
|
|
453
|
+
// a base é sempre o gateway, resolvido no lado do SDK.
|
|
455
454
|
baseURL: authUrl,
|
|
456
455
|
// Guarda o refreshToken do login — é ele que vai no body do refresh depois.
|
|
457
|
-
...data.refreshToken ? { refreshToken: data.refreshToken } : {}
|
|
458
|
-
...data.integrationURL ? { integrationURL: data.integrationURL } : {}
|
|
456
|
+
...data.refreshToken ? { refreshToken: data.refreshToken } : {}
|
|
459
457
|
};
|
|
460
458
|
autoConfigureFromLogin2(response, authUrl, projectId);
|
|
461
459
|
return response;
|
|
@@ -488,11 +486,9 @@ async function refreshTokenSilently2(authUrl, _projectId) {
|
|
|
488
486
|
const data = await postBffAuth(buildBffAuthEndpoint(authUrl, "/refresh-token"), { refreshToken });
|
|
489
487
|
return {
|
|
490
488
|
token: data.token,
|
|
491
|
-
// Refresh
|
|
492
|
-
// data.baseURL da resposta (que reescreveria a base e quebra no F5).
|
|
489
|
+
// Refresh não muda a base — mantém o authUrl (gateway).
|
|
493
490
|
baseURL: authUrl,
|
|
494
|
-
...data.refreshToken ? { refreshToken: data.refreshToken } : {}
|
|
495
|
-
...data.integrationURL ? { integrationURL: data.integrationURL } : {}
|
|
491
|
+
...data.refreshToken ? { refreshToken: data.refreshToken } : {}
|
|
496
492
|
};
|
|
497
493
|
} finally {
|
|
498
494
|
_refreshPromise2 = null;
|