Closed atlefren closed 4 years ago
Hmm, no idea why tests fail: they work fine on my machine:
atlefren@atlsve-M4800:~/code/azure-activedirectory-library-for-js [issue_764]$ npm test
> adal-angular@1.0.17 test /mnt/d/code/azure-activedirectory-library-for-js
> jasmine-node tests/unit/spec
.........Waiting for initial timeout
.Waiting for initial timeout
.............................Waiting for initial timeout
..................
Finished in 2.355 seconds
57 tests, 168 assertions, 0 failures, 0 skipped
Directly calling this._user in acquireToken will result in a "User login is required" error if the page has been reloaded.
The fix is to call getCachedUser, so that user is loaded from cache.
This solves #764
PR against master as this is a pressing issue that should be fixed asap. Please advice if I should use another branch.