Skip to content

Add classname to silent token renewal iframe HTML Element #6960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 22, 2024

Conversation

lalimasharda
Copy link
Contributor

No description provided.

@github-actions github-actions bot added documentation Related to documentation. msal-angular Related to @azure/msal-angular package samples Related to the samples apps for the library. msal-node Related to msal-node package msal-browser Related to msal-browser package msal-common Related to msal-common package msal-react Related to @azure/msal-react extensions Related to extensions for the base libraries labels Mar 19, 2024
@lalimasharda lalimasharda changed the base branch from dev to msal-lts March 19, 2024 19:31
@github-actions github-actions bot removed documentation Related to documentation. msal-angular Related to @azure/msal-angular package samples Related to the samples apps for the library. msal-node Related to msal-node package msal-common Related to msal-common package msal-react Related to @azure/msal-react labels Mar 19, 2024
@github-actions github-actions bot removed the extensions Related to extensions for the base libraries label Mar 19, 2024
const authFrame = document.createElement("iframe");

authFrame.className = "silentTokenRenewalIframe";
authFrame.src = urlNavigate;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we did not do this before? @tnorling any browser policy issues we need to worry about?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a limitation in some older browsers, namely IE11, that affected iframe creation. To workaround we allowed applications to configure whether the src attribute should be assigned synchronously or asynchronously - we can likely remove that configuration in v4 but we'll need to keep the existing model in v3 to avoid a change in behavior here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what I was wondering. @lalimasharda let us stick to className for now to unblock Dime.

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (msal-lts@9382838). Click here to learn what that means.

Additional details and impacted files
Flag Coverage Δ *Carryforward flag
msal-angular 96.63% <ø> (?)
msal-browser 86.05% <100.00%> (?)
msal-common 84.45% <ø> (?) Carriedforward from ac00d90
msal-node 80.85% <ø> (?) Carriedforward from ac00d90
msal-node-extensions 73.50% <ø> (?) Carriedforward from ac00d90
msal-react 94.68% <ø> (?)
node-token-validation 88.46% <ø> (?) Carriedforward from ac00d90

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
...l-browser/src/interaction_handler/SilentHandler.ts 88.57% <100.00%> (ø)


setTimeout(() => {
if (!frameHandle) {
reject("Unable to load iframe");
return;
}

frameHandle.src = urlNavigate;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change and needs to wait for v4 - can you file a work item if one doesn't exist?

const authFrame = document.createElement("iframe");

authFrame.className = "silentTokenRenewalIframe";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this is needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bing is blocking Dime ssoSilent on 2.x (pre-broker). They want a classname to get an exception.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see...interesting. Should we include "msal" in the name somewhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bad idea, @lalimasharda can we do that, say msalSilentIframe

@lalimasharda lalimasharda changed the title Add classname and src properties to silent token renewal iframe Add classname to silent token renewal iframe HTML Element Mar 20, 2024
@hectormmg hectormmg merged commit 72f5cc4 into msal-lts Mar 22, 2024
@hectormmg hectormmg deleted the addIframeClassName branch March 22, 2024 21:09
lalimasharda added a commit that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-browser Related to msal-browser package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants