AzureAD / azure-activedirectory-library-for-js

The code for ADAL.js and ADAL Angular has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/adal-angular
Apache License 2.0
627 stars 374 forks source link

Accessing to window.location.hash inside Azure Devops extension #842

Closed sashmen5 closed 4 years ago

sashmen5 commented 5 years ago

Browser:

Library Name

Library version

Library version: 1.0.15

Issue description

Hello. I develop Azure DevOps extension. And I still want to implement login popup because I want to fetch some user info from his Microsoft Azure Directory via API.

  1. adal.js fetchs access_token from window.location.hash . In regular web apps it works but in azure devops extension apps have not permission to fetch directly this hash. The way it is possible run code VSS.getService(VSS.ServiceIds.Navigation).then(function(navigationService) { // Get current hash value from host url navigationService.getHash().then(function (hash) { console.log("Host hash value: " + hash);
    }); });
    This code brings hash from uri successfully but he does it asynchronously unlike adal.js does synchronously.
    Is this library appropriate for my task?
  2. My extension already runs in own