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

checking whether interaction is in progress inside interceptor #5197

Closed
wants to merge 1 commit into from

Conversation

PramodKumarHK89
Copy link

checking whether interaction is in progress. issue #5146

checking whether interaction is in progress. issue AzureAD#5146
@ghost
Copy link

ghost commented Sep 12, 2022

Thank you for your contribution! Please generate change files by running npm run beachball:change from the root of the repo, then answer each prompt and push up the generated files.

@github-actions github-actions bot added the msal-angular Related to @azure/msal-angular package label Sep 12, 2022
@ghost
Copy link

ghost commented Sep 26, 2022

Reminder: The next release is scheduled for next week and this PR appears to be stale :(

If changes have been requested please address feedback.
If this PR is still a work in progress please mark as draft.

@ghost ghost added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Sep 26, 2022
@jasonnutter
Copy link
Contributor

jasonnutter commented Sep 26, 2022

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 npm run beachball:change from the root of the repo, complete the prompts, and push the generated change files, thanks!

return EMPTY;
private acquireTokenInteractively(authRequest: MsalInterceptorAuthRequest, scopes: string[]): Observable<AuthenticationResult> {
var subject = new Subject<AuthenticationResult>();
this.msalBroadcastService.inProgress$
Copy link
Contributor

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.

Copy link
Collaborator

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.

@ghost ghost removed the Needs: Attention 👋 Awaiting response from the MSAL.js team label Sep 26, 2022
@jasonnutter
Copy link
Contributor

@PramodKumarHK89 We cannot accept this PR in its current form. Please answer the above questions and feedback, or we will close this PR, thanks.

@PramodKumarHK89
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-angular Related to @azure/msal-angular package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants