mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-05-16 02:07:43 +01:00
remove same frame logic
This commit is contained in:
@@ -153,8 +153,7 @@ export async function acquireMsalTokenForAccount(
|
|||||||
// (redirect_in_iframe), so we fall back to loginPopup — MSAL v5's redirect bridge
|
// (redirect_in_iframe), so we fall back to loginPopup — MSAL v5's redirect bridge
|
||||||
// handles COOP via BroadcastChannel rather than window.opener, so the popup still works.
|
// handles COOP via BroadcastChannel rather than window.opener, so the popup still works.
|
||||||
const isMooncake = configContext.AAD_ENDPOINT === Constants.AadEndpoints.Mooncake;
|
const isMooncake = configContext.AAD_ENDPOINT === Constants.AadEndpoints.Mooncake;
|
||||||
const isInIframe = window !== window.parent;
|
if (isMooncake) {
|
||||||
if (isMooncake && !isInIframe) {
|
|
||||||
if (silent) {
|
if (silent) {
|
||||||
// ssoSilent already failed; a redirect cannot be used silently.
|
// ssoSilent already failed; a redirect cannot be used silently.
|
||||||
// Re-throw so the caller knows silent acquisition was not possible.
|
// Re-throw so the caller knows silent acquisition was not possible.
|
||||||
@@ -221,8 +220,7 @@ export async function acquireTokenWithMsal(
|
|||||||
// we fall back to acquireTokenPopup — MSAL v5's redirect bridge handles COOP via
|
// we fall back to acquireTokenPopup — MSAL v5's redirect bridge handles COOP via
|
||||||
// BroadcastChannel (not window.opener) so the popup works even from within an iframe.
|
// BroadcastChannel (not window.opener) so the popup works even from within an iframe.
|
||||||
const isMooncake = configContext.AAD_ENDPOINT === Constants.AadEndpoints.Mooncake;
|
const isMooncake = configContext.AAD_ENDPOINT === Constants.AadEndpoints.Mooncake;
|
||||||
const isInIframe = window !== window.parent;
|
if (isMooncake) {
|
||||||
if (isMooncake && !isInIframe) {
|
|
||||||
try {
|
try {
|
||||||
// acquireTokenRedirect navigates the browser away; execution does not continue
|
// acquireTokenRedirect navigates the browser away; execution does not continue
|
||||||
// past this await. On return, getMsalInstance()'s handleRedirectPromise() will
|
// past this await. On return, getMsalInstance()'s handleRedirectPromise() will
|
||||||
|
|||||||
Reference in New Issue
Block a user