{"action":"created","issue":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/401","repository_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/401/comments","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/401/events","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/401","id":180455395,"number":401,"title":"Issues when not using popup","user":{"login":"bondseid","id":11668422,"avatar_url":"https://avatars.githubusercontent.com/u/11668422?v=3","gravatar_id":"","url":"https://api.github.com/users/bondseid","html_url":"https://github.com/bondseid","followers_url":"https://api.github.com/users/bondseid/followers","following_url":"https://api.github.com/users/bondseid/following{/other_user}","gists_url":"https://api.github.com/users/bondseid/gists{/gist_id}","starred_url":"https://api.github.com/users/bondseid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bondseid/subscriptions","organizations_url":"https://api.github.com/users/bondseid/orgs","repos_url":"https://api.github.com/users/bondseid/repos","events_url":"https://api.github.com/users/bondseid/events{/privacy}","received_events_url":"https://api.github.com/users/bondseid/received_events","type":"User","site_admin":false},"labels":[{"id":431763636,"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/labels/User%20Reported","name":"User Reported","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"tushargupta51","id":803796,"avatar_url":"https://avatars.githubusercontent.com/u/803796?v=3","gravatar_id":"","url":"https://api.github.com/users/tushargupta51","html_url":"https://github.com/tushargupta51","followers_url":"https://api.github.com/users/tushargupta51/followers","following_url":"https://api.github.com/users/tushargupta51/following{/other_user}","gists_url":"https://api.github.com/users/tushargupta51/gists{/gist_id}","starred_url":"https://api.github.com/users/tushargupta51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tushargupta51/subscriptions","organizations_url":"https://api.github.com/users/tushargupta51/orgs","repos_url":"https://api.github.com/users/tushargupta51/repos","events_url":"https://api.github.com/users/tushargupta51/events{/privacy}","received_events_url":"https://api.github.com/users/tushargupta51/received_events","type":"User","site_admin":false},"assignees":[{"login":"tushargupta51","id":803796,"avatar_url":"https://avatars.githubusercontent.com/u/803796?v=3","gravatar_id":"","url":"https://api.github.com/users/tushargupta51","html_url":"https://github.com/tushargupta51","followers_url":"https://api.github.com/users/tushargupta51/followers","following_url":"https://api.github.com/users/tushargupta51/following{/other_user}","gists_url":"https://api.github.com/users/tushargupta51/gists{/gist_id}","starred_url":"https://api.github.com/users/tushargupta51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tushargupta51/subscriptions","organizations_url":"https://api.github.com/users/tushargupta51/orgs","repos_url":"https://api.github.com/users/tushargupta51/repos","events_url":"https://api.github.com/users/tushargupta51/events{/privacy}","received_events_url":"https://api.github.com/users/tushargupta51/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-10-01T12:59:58Z","updated_at":"2016-11-12T04:42:38Z","closed_at":null,"body":"When integrating the base adal setup and calling adalAuthenticationService.login(), once returned to my replybackurl, no $rootscope emissions are captured and the adalservice is not authenticated. When using the basic configuration the authentication takes plac ein the same browser window. \n\nAlso, using the standard route authentication has no effect: My route is resolved even if the adalservice is not authenticated.\n\n```\nangular.module('app').config ($routeProvider) ->\n    $routeProvider\n    .when('/app', {\n        templateUrl: 'app.html',\n        requireADLogin: true\n    })\n\n```\n\nMy configuration:\n\n```\n##\n## Configuring ADAL\n##\napp.config ($httpProvider, adalAuthenticationServiceProvider) ->\n\n    endpoints = {}\n\n    adalAuthenticationServiceProvider.init({\n        clientId: \"clientid\",\n        redirectUri: \"http://localhost:9999/adal-login\",\n        endpoints: endpoints,\n    }, $httpProvider)\n\n```\n\n```\nangular.module('app').controller 'LoginCtrl', ($rootScope, $scope, $location, adalAuthenticationService) ->\n\n    $scope.loginWithAdal = () ->\n        console.log 'loggin in'\n        adalAuthenticationService.login()\n\n    $scope.logoutWithAdal = () ->\n        console.log 'loggin in'\n        adalAuthenticationService.logOut()\n\n    $rootScope.$on \"adal:loginSuccess\", () ->\n        console.log 'success'\n        AceLogin.loginWithAdal()\n\n\n    $rootScope.$on \"adal:loginFailure\", () ->\n        console.log 'fail'\n\n    $rootScope.$on \"adal:notAuthorized\", () ->\n        console.log 'not authed'\n```\n\nThe solution i have found is by appending a popUp object property to the config. This triggers the azure authentication to take place in a popup:\n\n```\n adalAuthenticationServiceProvider.init({\n        clientId: \"848ffbb4-b40d-490e-af67-a14cf29259bb\",\n        redirectUri: \"http://localhost:9999/adal-login\",\n        endpoints: endpoints,\n       popUp: true\n    })\n\n```\n\nIn this case however the route authentication still does not work.\n\nThis was all tested in a localhost environment. Browser: chrome, firefox on a mac.\n"},"comment":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/comments/260101573","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/401#issuecomment-260101573","issue_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-js/issues/401","id":260101573,"user":{"login":"bondseid","id":11668422,"avatar_url":"https://avatars.githubusercontent.com/u/11668422?v=3","gravatar_id":"","url":"https://api.github.com/users/bondseid","html_url":"https://github.com/bondseid","followers_url":"https://api.github.com/users/bondseid/followers","following_url":"https://api.github.com/users/bondseid/following{/other_user}","gists_url":"https://api.github.com/users/bondseid/gists{/gist_id}","starred_url":"https://api.github.com/users/bondseid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bondseid/subscriptions","organizations_url":"https://api.github.com/users/bondseid/orgs","repos_url":"https://api.github.com/users/bondseid/repos","events_url":"https://api.github.com/users/bondseid/events{/privacy}","received_events_url":"https://api.github.com/users/bondseid/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T04:42:38Z","updated_at":"2016-11-12T04:42:38Z","body":"Hey, have you had a chance to verify this bug?"}}
{"actor":{"display_login":"bondseid"}}