From 22857f8f031e3e002c8a601ccd8b7feb80898e69 Mon Sep 17 00:00:00 2001 From: abuecker Date: Mon, 20 Oct 2014 21:53:19 -0700 Subject: [PATCH] fix(AccessToken): Added token query based on $location.path() refactor(template): Correct template path typo --- dist/oauth-ng.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/oauth-ng.js b/dist/oauth-ng.js index 1909d0e..988d7dd 100644 --- a/dist/oauth-ng.js +++ b/dist/oauth-ng.js @@ -43,7 +43,7 @@ accessTokenService.factory('AccessToken', function($rootScope, $location, $sessi * - takes the token from the sessionStorage */ service.set = function(){ - setTokenFromString($location.hash()); + setTokenFromString($location.path().substr(1)); //If hash is present in URL always use it, cuz its coming from oAuth2 provider redirect if(null === service.token){ @@ -330,7 +330,7 @@ directives.directive('oauth', function(AccessToken, Endpoint, Profile, $location var initAttributes = function() { scope.authorizePath = typeof(scope.authorizePath)!=="undefined" ?scope.authorizePath : '/oauth/authorize'; scope.tokenPath = typeof(scope.tokenPath)!=="undefined" ?scope.tokenPath: '/oauth/token'; - scope.template = typeof(scope.template)!=="undefined"? scope.template: 'bower_components/oauth-ngw/dist/views/templates/default.html'; + scope.template = typeof(scope.template)!=="undefined"? scope.template: 'bower_components/oauth-ng/dist/views/templates/default.html'; scope.text = typeof(scope.text)!=="undefined"?scope.text: 'Sign In'; scope.state = typeof(scope.state)!=="undefined" ?scope.state : undefined; scope.scope = typeof(scope.scope)!=="undefined" ?scope.scope : undefined;