Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need for memento hack #234450

Merged
merged 1 commit into from
Nov 22, 2024
Merged

No need for memento hack #234450

merged 1 commit into from
Nov 22, 2024

Conversation

TylerLeonhardt
Copy link
Member

MSAL node made clearCache synchronous 🎉 so we can safely depend on it for clearing the cache.

Context: The default behavior of MSAL's internal cache is that it is a union with what's in the persistant cache (secret storage) but what we want is that secret storage is the source of truth, so every time we receive an update to secret storage, we clear the in-memory cache to get the data from the persistant cache.

Also bumps msal-node-extensions while we're at it.

MSAL node made `clearCache` synchronous 🎉 so we can safely depend on it for clearing the cache.

> Context: The default behavior of MSAL's internal cache is that it is a union with what's in the persistant cache (secret storage) but what _we_ want is that secret storage is the source of truth, so every time we receive an update to secret storage, we clear the in-memory cache to get the data from the persistant cache.

Also bumps msal-node-extensions while we're at it.
Copy link
Contributor

@rzhao271 rzhao271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hype!

@TylerLeonhardt TylerLeonhardt merged commit f6dd987 into main Nov 22, 2024
8 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/peaceful-toucan branch November 22, 2024 21:35
TylerLeonhardt added a commit that referenced this pull request Nov 22, 2024
We needed this workaround because MSAL was always trying to require a native module we never use.

I sent a PR to MSAL to rework their behavior and that has now been released and we pulled that in in #234450

With the updated msal-node-extensions library, we no longer need to do this webpack logic.
TylerLeonhardt added a commit that referenced this pull request Nov 22, 2024
We needed this workaround because MSAL was always trying to require a native module we never use.

I sent a PR to MSAL to rework their behavior and that has now been released and we pulled that in in #234450

With the updated msal-node-extensions library, we no longer need to do this webpack logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants