Skip to content

feat: store acquire token as promise for multi access - #2

Open
TheVaan wants to merge 1 commit into
shigeyf:mainfrom
TheVaan:feat/stored-acquire-token-promise
Open

feat: store acquire token as promise for multi access#2
TheVaan wants to merge 1 commit into
shigeyf:mainfrom
TheVaan:feat/stored-acquire-token-promise

Conversation

@TheVaan

@TheVaan TheVaan commented Jan 4, 2024

Copy link
Copy Markdown

Hey,

I had some trouble with concurrent calls of acquireToken(). This results from multiple api calls done from my Vue app simultanious. First, I was confused why some of the calls of acquireToken not updating the result value until I found out, the method blocks itself from being called while already called and not finished.
I figured out a workaround by saving the promise what results in getting exactly the same promise while not finished processing. I think this workaround should be the default behavior because it's hard to figure out why useMsalAuthentication()s result is undefined without a deep-dive into the source code.

Cheers!

@TheVaan

TheVaan commented Jan 10, 2024

Copy link
Copy Markdown
Author

Hi @shigeyf,

any chance that this PR could be merged or rejected promptly? This issue is blocks my work and I have to decide wether implementing the solution in my code if this gets rejected.

@TheVaan

TheVaan commented Feb 28, 2024

Copy link
Copy Markdown
Author

Bump....

@TheVaan
TheVaan force-pushed the feat/stored-acquire-token-promise branch from c3c1314 to ed79585 Compare March 1, 2024 10:01
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.

1 participant