Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

480
Views
¿Cómo cerrar la ventana emergente del navegador msal usando JS?

Estoy tratando de averiguar cómo cerrar programáticamente la ventana emergente del navegador MSAL en su versión 2.0. https://github.com/AzureAD/microsoft-authentication-library-for-js

Actualmente activé esta ventana emergente a través de un clic en una página web.

El window.close no cierra la ventana emergente, ¿hay alguna forma alternativa de lograr esto?

 function msalAuth(){ const config = { auth: { clientId: 'xxx', } } const loginRequest = { scopes: ["User.ReadWrite"] } let accountId = ""; const myMsal = new msal.PublicClientApplication(config); myMsal.loginPopup(loginRequest) .then(function (loginResponse) { accountId = loginResponse.account.homeAccountId; // Display signed-in user content, call API, etc. }).catch(function (error) { //login failure console.log(error); }); const callbackId = myMsal.addEventCallback((message) => { // This will be run every time an event is emitted after registering this callback if (message.eventType === msal.EventType.LOGIN_FAILURE) { const result = message.payload; console.log("Failed auth !!") // Some actions window.close(); // Want to close the popup window exactly here } }); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!