Optimized the process for obtaining user sessions for SPA and comcipapic
This commit is contained in:
@@ -334,8 +334,8 @@ function createAuthConsumerSession({
|
||||
if (restarted) restartedDocument = documentId;
|
||||
}
|
||||
} else if (page?.status === "ready" && documentId) {
|
||||
// Confirm a stable, fully loaded document, not a transient SAML page.
|
||||
await wait(500);
|
||||
// Confirm the parsed application document without waiting for visual assets.
|
||||
await wait(100);
|
||||
let confirmed;
|
||||
try { confirmed = await inspectPage(tab); } catch { /* A redirect started during validation. */ }
|
||||
if (confirmed?.status === "ready" && confirmed.documentId === documentId && !state?.failedStatus) {
|
||||
|
||||
@@ -13,7 +13,7 @@ function createSpaPage() {
|
||||
else if (/^\/(?:cloudgate|login|signin|sso|oauth)(?:\/|$)/i.test(location.pathname)
|
||||
|| /\b(?:sign(?:ing)? in|log in|single sign.on|oracle access manager)\b/i.test(document.title)
|
||||
|| document.querySelector('input[name="SAMLResponse"], input[name="SAMLRequest"], input[type="password"], form[action*="/sso"], form[action*="/login"], meta[http-equiv="refresh" i]')) status = "login";
|
||||
else if (document.readyState === "complete" && text
|
||||
else if ((document.readyState === "interactive" || document.readyState === "complete") && text
|
||||
&& document.querySelector('a[href], button, input, [role="main"], main, nav')) status = "ready";
|
||||
return { status, documentId };
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ function createFusionSrDetails({ fetchJson, tabsCreate, tabsRemove, supportsFire
|
||||
let session = sessions.get(key);
|
||||
if (!session) {
|
||||
const details = {
|
||||
url: "https://comcipapic-oalprod.integration.ocp.oraclecloud.com/ic/builder/rt/oalset_semc/live/webApps/Dashboard/?page=shell&shell=main&main=manageresourcerequests",
|
||||
url: "https://comcipapic-oalprod.integration.ocp.oraclecloud.com/ic/builder/rt/SeaaS_initiation/live/webApps/external/",
|
||||
active: false
|
||||
};
|
||||
if (Number.isInteger(sender?.tab?.windowId)) details.windowId = sender.tab.windowId;
|
||||
|
||||
Reference in New Issue
Block a user