How to use an identity service that must run in a popup to fulfill requirements?

The Microsoft Teams SDK allows Pages to authenticate in a special popup since most authentication pages refuse to be loaded in an iframe for good reason.

The code used for that is the following:

    microsoftTeams.initialize(() => {
        microsoftTeams.authentication.authenticate({
            url: "https://<foundryURL>/authService/<ServiceID>/saml/login?provider=<ProviderName>&appkey=<AppKey>",
            width: 400,
            height: 600,
            successCallback: () => {
                alert("Login success via auth service");
                //handleSignedIn
                },
             failureCallback: (error) => {
                alert("Login error via auth service: " + error);
                //handleSignedOut
                }
        });
    });

This code launches the popup, loads the identity services URL correctly, but the identity service breaks out into a new browser window immediately after launch. Is there a way to force it to stay inside of the popup window?