Open Closed

Localize connect/token Endpoint's error_description #4489


User avatar
0
a7mdfre7at created

Hello,

I'm trying to localize error descriptions that returned from connect/token endpoint, if there is a way to do that, could you produce it?

As a try to do that, I decided to override some methods from TokenController to return localized error_description, but I couldn't find the controller in Volo.Abp.OpenIddict.Controllers namespace.

Please advice.

  • ABP Framework version: v6.0.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

5 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    Yes, the way is to override the TokenController.

    but I couldn't find the controller in Volo.Abp.OpenIddict.Controllers namespace.

    Are you using the OpenIddict? you need to custom it in the AuthServer(if exists) or HttpApi.Host project

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    a7mdfre7at created

    I'm using the default authentication provider,

    I have HttpApi.Host, could you please provide me detailed steps to override it?

    Yes, the way is to override the TokenController.

    but it does not exist or provide me with its namespace.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    Can you share the .csproj file content?

    BTW, it's working for me:

    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(TokenController))]
    public class MyTokenController : Volo.Abp.OpenIddict.Controllers.TokenController
    {
        protected override Task<IActionResult> HandlePasswordAsync(OpenIddictRequest request)
        {
            return base.HandlePasswordAsync(request);
        }
    }
    
    

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    a7mdfre7at created

    Hi, Here is the .csproj file content

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    The project you're shared is HttpApi not HttpApi.Host.

    You can look up which project references the Volo.Abp.Account.Pro.Public.Web.OpenIddict package and custom TokenController in it.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 09, 2026, 11:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.