Customize providers.js v4

Hi!

I need to update callback of one provider, this file is located under node_modules/@strapi/plugin-users-permissions/server/services/providers.js

How can duplicate this funcion under the src folder?


case 'microsoft': {
        const microsoft = purest({
          provider: 'microsoft',
          config: purestConfig,
        });

        microsoft
          .query()
          .get('me')
          .auth(access_token)
          .request((err, res, body) => {
            if (err) {
              callback(err);
            } else {
              callback(null, {
                username: body.userPrincipalName,
                email: body.mail,
              });

            }

          });

        break;

      }
System Information
  • Strapi Version:4.0.5
  • Operating System: Linux
  • Database: Postgresql
  • Node Version: 12.22.9
  • NPM Version: 6.14.15
  • Yarn Version: –

Hi! any idea with this?

thanks a lot!