I just found out that new AuthenticationContext doesn't actually create new instances after the first time it's used.
const a = new AuthenticationContext({
clientId: 'A'
});
const b = new AuthenticationContext({
clientId: 'B'
});
// next assertion fails
expect(Object.is(a, b)).toBe(false);
I just found out that
new AuthenticationContext
doesn't actually createnew
instances after the first time it's used.This should be documented here: https://github.com/AzureAD/azure-activedirectory-library-for-js/wiki/Config-authentication-context#authenticationcontext
It's important to mention that the constructor ignores the options argument when called more than once.