-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
checking whether interaction is in progress inside interceptor #5197
Conversation
checking whether interaction is in progress. issue AzureAD#5146
Thank you for your contribution! Please generate change files by running |
Reminder: The next release is scheduled for next week and this PR appears to be stale :( If changes have been requested please address feedback. |
Apologies for the delay. With this chage, when interaction is in progress, what happens in the interceptor? Nothing? Also, please add unit tests, and run |
return EMPTY; | ||
private acquireTokenInteractively(authRequest: MsalInterceptorAuthRequest, scopes: string[]): Observable<AuthenticationResult> { | ||
var subject = new Subject<AuthenticationResult>(); | ||
this.msalBroadcastService.inProgress$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think potentially a better approach is to have the interceptor class start listening for inProgress events in the constuctor, and main an internal field (i.e. this.currentInteractionStatus), instead of listening only when acquireTokenInteractively is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I also think it would be good to have it call acquireTokenSilent again when inProgress turns back to None
. This would prevent a scenario where many calls are queued up all invoking their own interaction back to back to back.
@PramodKumarHK89 We cannot accept this PR in its current form. Please answer the above questions and feedback, or we will close this PR, thanks. |
@jasonnutter : Unfortunately, I won't be able to spend time on this due to other priorities. Let me go ahead and close this PR for now and later when I have some bandwidth, I'll accommodate all the suggestions that you guys provided. Thank you so much. |
checking whether interaction is in progress. issue #5146