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

Add CancellationToken to WebAuthenticator #26137

Open
eth-ellis opened this issue Nov 26, 2024 · 0 comments · May be fixed by #26180
Open

Add CancellationToken to WebAuthenticator #26137

eth-ellis opened this issue Nov 26, 2024 · 0 comments · May be fixed by #26180
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info good first issue Good for newcomers proposal/open t/enhancement ☀️ New feature or request
Milestone

Comments

@eth-ellis
Copy link
Contributor

Description

It would be great to be able to cancel WebAuthenticator.AuthenticateAsync programatically using a CancellationToken.

Right now, TaskCancelledException is only thrown if the user taps the close button on the Chrome Custom Tab.

Public API Changes

public interface IWebAuthenticator
{
    Task<WebAuthenticatorResult> AuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions);

    Task<WebAuthenticatorResult> AuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions, CancellationToken cancellationToken);
}

Intended Use-Case

The intended use case would be to cancel the WebAuthenticator programmatically.

An example would be if the Chrome Custom Tabs Activity is closed due to deep linking.

@jfversluis jfversluis added good first issue Good for newcomers area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info t/enhancement ☀️ New feature or request labels Nov 27, 2024
@jfversluis jfversluis added this to the Backlog milestone Nov 27, 2024
marcel-silva pushed a commit to marcel-silva/maui that referenced this issue Nov 28, 2024
Able to cancel WebAuthenticator.AuthenticateAsync programatically using a CancellationToken

Issues Fixed
Fixes dotnet#26137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info good first issue Good for newcomers proposal/open t/enhancement ☀️ New feature or request
Projects
None yet
2 participants