-
Notifications
You must be signed in to change notification settings - Fork 149
Token Cache not updates correctly #199
Comments
All current authentication work from Microsoft is delivered through the |
Hi AzureAD/azure-activedirectory-library-for-nodejs#215 |
I have to create a new issue here because the original one #197 is closed by mistake and no further response after that.
The code here:
azure-activedirectory-library-for-nodejs/lib/memory-cache.js
Line 63 in 2badd7c
isEqual
to check if two token entries are equal or not. But sometimes,addElement
is just an update ofelement
, (All the fields are equal except theexpiresOn
)For example:
![image](https://user-images.githubusercontent.com/6193897/38725698-bd58e078-3f3a-11e8-835d-8494242c138e.png)
Then, after
add
method, the token cache will have two tokens which are duplicated.After that, when we trigger
find
for the token cache, it will causeMore than one token matches the criteria. The result is ambiguous
error.Here:
azure-activedirectory-library-for-nodejs/lib/cache-driver.js
Line 223 in 9aa5672
The text was updated successfully, but these errors were encountered: