0
votes

I have cloned this repo. Which uses adal-angular.js

Everything work as expected;except the token refreshing. Indeed, if after 1 hour I do anything that issues an XHR to a protected resource then no more token being sent along with the request and I get stuck with a 401. Shouldn’t be the token renewed silently by the hidden iframe? Or Am I missing something.

1

1 Answers

0
votes

Need to add an end-point to get the token silently.

var endpoints = {
    'api/TodoList/': '00000000-0000-0000-000-000000000000',
};

adalProvider.init(
    {
        instance: 'https://login.microsoftonline.com/',
        tenant: 'foo.onmicrosoft.com',
        clientId: '00000000-5638-0000-000-000000000000',
        extraQueryParameter: 'nux=1',
        cacheLocation: 'localStorage', 
        endpoints: endpoints
    },
    $httpProvider
    );