I've setup the adal and adal-angular v.1.0.10 libraries with my SPA application with mostly great success. I am using webpack, but reference these in my html page in hopes of avoiding global scope issues (though I'd like it to be a dependency). Everything works until the browser attempts to open an iframe to acquire a refresh token, and each iframe opens another iframe inside itself. It logs no errors, and I can't find an explanation as to what I'm doing wrong. So I'm forced to only run the application in a fresh incognito browser. I would appreciate even an explanation as to why this is happening, as we are very married to Azure AD.
relevant sections of index.html
<md-button aria-label="Login" ng-if="!userInfo.isAuthenticated" ng-click="login()">
Login
</md-button>
<script src="build/app.bundle.js" charset="utf-8"></script>
<script src="Scripts/adal.min.js" charset="utf-8"></script>
<script src="Scripts/adal-angular.min.js" charset="utf-8"></script>
my app.js
angular.module('myApp', ['AdalAngular', require('angular-route'), require('angular-animate'), require('angular-sanitize'), 'ngCookies', etc..])
.config(['$routeProvider', '$locationProvider', '$mdThemingProvider', '$httpProvider', 'adalAuthenticationServiceProvider',
function ($routeProvider, $locationProvider, $mdThemingProvider, $httpProvider, adalProvider) {
// azure ad init
adalProvider.init({
instance: 'https://login.microsoftonline.com/',
tenant: TENANT,
clientId: CLIENTID,
cacheLocation: 'localStorage',
anonymousEndpoints: []
},
$httpProvider
);
$routeProvider
.when('/home', {
templateUrl: '/App/Layout/home.html'
})
.when('/admin', {
templateUrl: '/App/Admin/admin.html',
requireADLogin: true
})
etc...
$locationProvider.html5Mode(true).hashPrefix('!');
}]);