question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Outdated and incorrect documentation on distributed caching in `@azure/msal-node`

See original GitHub issue

Core Library

MSAL Node (@azure/msal-node)

Wrapper Library

Not Applicable (edit: removed angular, not applicable).

Documentation Location

https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-node-samples/ExpressTestApp/TestApp/App/utils/cachePlugin.js

Description

The example provided here doesn’t seem to be correct anymore.

This line in the cachePlugin.js file refers to the method getKVStore() that no longer exists on the object. What would be the appropriate alternative for @azure/msal-node v1.7.0?

I’ve been looking for good documentation on how to implement an express application (or any web application really) that supports multi-user authentication while protecting each users cached credentials correctly. Many different MS specific sites such as this and this eventually lead back the above example. And since the example no longer works it is hard to know the correct way to implement this.

Authentication is already pretty hard to get right so I feel it is critical to have good documentation on how to distribute cached credentials correctly using msal. Especially when the library is recommended by Microsoft.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
derisencommented, Jul 11, 2022

@jon-a-nygaard apologies for the confusion. This sample was demoing an initial approach to distributed caching, but since then msal-node was updated and a more mature pattern has been implemented here -can you please refer to that sample instead? I’ll keep this open to update the ExpressTestApp sample and the distributed caching doc to clarify things.

0reactions
jon-a-nygaardcommented, Jul 12, 2022

Thanks for the quick reply and help @derisen, I will look to the RedisTestApp sample. Glad to see that you’re updating the docs as well 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Distributed caching points to a deprecated Chocolatey package
I just tried it with the code from the MS docs example: services.AddStackExchangeRedisCache(options => { options.Configuration = "localhost"; ...
Read more >
Caching guidance - Azure Architecture Center | Microsoft Learn
Learn how caching can improve the performance and scalability of a system by copying frequently accessed data to fast storage close to the...
Read more >
Caching in GitLab CI/CD
Use cache for dependencies, like packages you download from the internet. Cache is stored where GitLab Runner is installed and uploaded to S3...
Read more >
Working with a Distributed Cache — ASP.NET documentation
A distributed cache is shared by multiple app servers (see Caching Basics). The information in the cache is not stored in the memory...
Read more >
Caching challenges and strategies - Amazon AWS
An unanticipated shift in the distribution of this modal behavior can potentially lead to disaster. We have experienced both the benefits and challenges...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found