aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Add CancellationToken to UserManager<>/SignInManager<>

Open TheYoxy opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

In the current state, doing async tasks by using the UserManager<> class. Actually, it's not possible to pass any CancellationToken as it is using the cancellation token stored in the class itself. The exact same issue appears in the SignInManager<>class.

Describe the solution you'd like

Update every methods of the UserManager class to add a CancellationToken parameters to pass trough in case of cancellation has been requested by the user.

Additional context

No response

TheYoxy avatar Dec 13 '22 18:12 TheYoxy

Triage: This seems like an appropriate request. We probably want to provide CancellationToken as a method-level parameter and not class-level property. @TheYoxy Would you be interested in submitting an API proposal to add CancellationToken to the necessary async methods?

captainsafia avatar Jan 03 '23 23:01 captainsafia

I can try to write it. If I have others remarks regarding these two classes, should I mention them too inside the API proposal? (There is no interface for IoC for these classes and there is some Async suffix that are missing on some methods)

TheYoxy avatar Jan 04 '23 14:01 TheYoxy

If I have others remarks regarding these two classes, should I mention them too inside the API proposal? (There is no interface for IoC for these classes and there is some Async suffix that are missing on some methods)

We can split these out into separate issues for easier review. Thanks for taking a look at this!

captainsafia avatar Jan 04 '23 16:01 captainsafia