-
Notifications
You must be signed in to change notification settings - Fork 344
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
Make AcquireTokenAsync cancellable by passing CancellationToken #635
Comments
@jmprieur - this is a great feature to add and should be added to all our async methods. API design standards for async APIs state that they should all have an overload taking a Cancellation Token. |
@MarkZuber (for memory): something we'll do systematically with the builder-based AcquireTokenXXX |
@jmprieur -- agreed. I don't think a work item for full plumbing of CancellationToken was added to that work item list I sent you. Can you please add it when you file them? |
Done part of MSAL 3.x |
Fixed in MSAL 3.0.0-preview release |
Created from the corresponding feature request in ADAL.NET (ADAL.NET#1306), raised by @marnilss
Is your feature request related to a problem? Please describe.
When doing broker assisted logins (MS Authenticator) in an App, and the user cancels the login process by pressing Home button on device and then reactivating the App, the App is hung waiting for the AcquireTokenAsync to return.
Describe the solution you'd like
Make it possible to pass a CancellationToken in the request to AcquireTokenAsync
Describe alternatives you've considered
Alternatively a new method on the AuthenticationContinuationHelper, like AbortBroker(), to cancel the hanging/pending authentication call waiting for broker to reactivate with AuthenticationContinuationHelper.SetBrokerContinuationEventArgs(...).
I have found a workaround on this by crafting a special url like https://dummypath?error=...&error_description=.... and pass it to AuthenticationContinuationHelper.SetBrokerContinuationEventArgs().
Additional context
Using broker assisted (SSO) with MS Authenticator and Azure AD with ADAL i iOS app.
The text was updated successfully, but these errors were encountered: