Overridden auth.js file not overriding /api/auth/local API

Issue title: Overridden auth.js file not overriding /api/auth/local API

Issue description:

I am trying to override the /api/auth/local API in Strapi by creating a new auth.js file in the extensions/users-permissions/controllers/ directory. However, the overridden auth.js file is not overriding the /api/auth/local API.

I have verified that:

  • My auth.js file is in the correct directory.

  • My auth.js file has the correct name.

  • My auth.js file is exporting the register(), login(), and resetPassword() methods.

  • My overridden methods are calling the corresponding Strapi services.

  • My overridden methods are returning the correct data.

  • I have restarted my Strapi server after making changes to my auth.js file.

I have also checked the Strapi logs for any errors, but there are no errors.

I am using Strapi version 4.13.6.

I would appreciate it if you could look into this issue and help me to resolve it. Thank you for your time and consideration.

Additional information:

  • I am using Node.js version 18.17.1.

  • I have tried disabling all of my custom plugins, but the overridden auth.js file is still not overriding the /api/auth/local API.

I hope this information is helpful. Please let me know if you have any questions.