'cordova.exec' is not working in capacitor project

I’m trying to integrate my Ionic/Capacitor app with Microsoft Authentication Library (Msal), and unfortunatly i couldn’t found any Capacitor plugin for that, only found this Cordova plugin with its Ionic wrapper.

So I’ve followed the instructions of how to use cordova plugins with capacitor according with the instructions of the plugin itself, but unforunatly with no success.

The problem is in the cordova plugin not being executed:

cordova.exec(successCallback, errorCallback, 'MsalPlugin', 'msalInit', [JSON.stringify(options)]);

I added the cordova.js and cordova_plugin.js in index.html , but still calling another place rather than the real exec function (I’ve tried in cordova project to see what it’s calling).

Was i missing something in the integration between cordova and capacitor, or it’s something in plugin itself preventing it from being working with capacitor.