Skip to content

Able to cancel WebAuthenticator.AuthenticateAsync programmatically using a CancellationToken #26137 #26180

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

Merged
merged 3 commits into from
Mar 17, 2025

Conversation

marcel-silva
Copy link

Description of Change:
This change introduces a new overload for WebAuthenticator.AuthenticateAsync that accepts a CancellationToken, allowing the authentication flow to be canceled programmatically.

Changes:

  • Added the new AuthenticateAsync overload in IWebAuthenticator and platform-specific implementations.
  • Updated the WebAuthenticator and WebAuthenticatorExtensions classes.
  • Created new unit tests for the CancellationToken functionality.

Issues Fixed
Fixes #26137

@marcel-silva marcel-silva requested a review from a team as a code owner November 28, 2024 02:31
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 28, 2024
@marcel-silva
Copy link
Author

marcel-silva commented Nov 28, 2024 via email

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Nov 28, 2024

/azp run

@jsuarezruiz jsuarezruiz added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Nov 28, 2024

This comment was marked as off-topic.

@jfversluis
Copy link
Member

Hey @marcel-silva sorry this took a while! Are you still interested to get this over the finish line? If not, I will take over :)

First thing we need to do is target this against the net10.0 branch since it introduces new APIs. Thanks!

@jfversluis jfversluis self-assigned this Feb 25, 2025
@jfversluis jfversluis added this to the .NET 10.0-preview2 milestone Feb 25, 2025
@marcel-silva
Copy link
Author

go ahead please.

Able to cancel WebAuthenticator.AuthenticateAsync programatically using a CancellationToken

Issues Fixed
Fixes dotnet#26137
@jfversluis jfversluis requested a review from a team as a code owner February 26, 2025 09:11
@jfversluis jfversluis changed the base branch from main to net10.0 February 26, 2025 09:11
@jfversluis
Copy link
Member

Done, thanks @marcel-silva! Was there any reason you didn't implement it for macOS?

I added that one now and made the "old" methods call the new ones so we avoid code duplication. I'd appreciate it if you could look over it to make sure I didn't do something dumb. Thanks for all your effort here!

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@github-project-automation github-project-automation bot moved this from Ready To Review to Approved in MAUI SDK Ongoing Mar 17, 2025
@rmarinho
Copy link
Member

Failing tests not related. LGTM

Copy link
Contributor

🚨 API change(s) detected @davidbritch FYI

@jfversluis
Copy link
Member

OK @marcel-silva thank you for the initial work here! You are now a .NET MAUI contributor!

@jfversluis jfversluis merged commit 428c506 into dotnet:net10.0 Mar 17, 2025
116 of 123 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Mar 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info community ✨ Community Contribution essentials-webauth t/breaking 💥
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add CancellationToken to WebAuthenticator
6 participants