I am using microsoft-adal-angular6 for azure ad authentication in my angular 6 app. Currently when the app loads for the first time, it calls the api methods 2 times and i see my loading icon. But after i refresh the page, it works fine.
Why is it working this way? what can be done to avoid this. I have already tried changing redirecturi to /redirect.html, but no luck.
The same thing happens when i navigate from my main site to sub-site . After i navigate to sub-site, ill have to refresh to page to get the token working .
Thanks for your time and reply in advance. Any sample code in angular 2 or above would be very helpful.