ADAL.js - "Nonce is not same as undefined"
<p>I am currently having trouble with the ADAL.js (v1.0.7) library. When I load my app after a decent period of time I get a login error stating "Nonce is not same as undefined." After looking over the code, I am wondering if I am missing a best practice. To my knowledge, I have followed the suggestions of @vibronet <a href="http://www.cloudidentity.com/blog/2014/10/28/adal-javascript-and-angularjs-deep-dive/" rel="nofollow">here</a>. Should I be refreshing the user profile, or logging out, or something else?</p>

<p>My configuration looks like:</p>

<pre><code>        window.config = {
        instance: 'https://login.microsoftonline.com/',
        tenant: 'blahblahblah.onmicrosoft.com',
        clientId: 'GUID',
        postLogoutRedirectUri: window.location.origin,
        cacheLocation: 'localStorage'
    };

    this.authContext = new window.AuthenticationContext(window.config);
    var isCallback = this.authContext.isCallback(window.location.hash);
    this.authContext.handleWindowCallback();

    if (isCallback &amp;&amp; !this.authContext.getLoginError()) {
        window.location = this.authContext._getItem(this.authContext.CONSTANTS.STORAGE.LOGIN_REQUEST);
    }
</code></pre>

<p>If there has been an extended period of inactivity, the error occurs after calling this.authContext.login(). In order to get the error I call this.authContext.getLoginError().</p>

<p>I get why the nonce is different, but I want to "reset" it or cause a brand new login to happen.</p>

<p>Please let me know what other relevant information I can provide.</p>