Found how to do that on my own. You need to go in src/user-permissions/controllers/auth.js (if you don’t have one of the folders feel free to create them) and just copy the code from node_modules/@strapi/plugin-users-permissions/server/controllers/auth.js into your auth.js and change the code to fit your needs.
4 Likes