Logging the reason behind "InvalidToken" response from UserManager.ConfirmEmailAsync method
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### 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.
**Problem**
I have been getting an "InvalidToken" response from the `ConfirmEmailAsync` [method](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.usermanager-1.confirmemailasync?view=aspnetcore-7.0) in a .NET 7-based API project. Error description contains "Invalid token". The token can be invalid for multiple reasons, including missing characters, inconsistent data protection key and expiration. The reason should be logged otherwise debugging this problem becomes almost impossible.
### Describe the solution you'd like
The proper detailed reason for the email confirmation token being "invalid" should be logged by the framework.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.