1
votes

I'm trying to add basic authentication to a Vue.js spa. I'm following the tutorial on https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-single-page-app

In case of the sample SPA provied by MS everything works. When I try to do the same in Vue.js I get the following error: "ClientAuthError: access_token_entity_null: Access token entity is null, please check logs and cache to ensure a valid access token is present." when doing

        .then(handleResponse)
        .catch(error => {
            console.log(error);
        });

However after refreshing the page user seems to be logged in: myMSALObj.getAllAccounts() returnes the account used during the login.

What I may be doing wrong? I was unable to find any useful info about it :(

2
This is a known issue that will be fixed in the next version. Try an older version as a mitigation for now. - jasonnutter
Using older version solved the problem - thanks! - GUZ

2 Answers

1
votes

As mentioned in the comments using an older version of the library solved the problem.

1
votes

This issue seems to have been solved in version 2.14.2

Instead of downgrading you should try upgrading :-)