Custom authentication methods plugin in kirby 3

Hello everyone,

I saw some different topics about making my own authentication methods, and the solution seems to be making a plugin. Following pages like https://getkirby.com/docs/reference/plugins/extensions/panel-login and the guide to make plugins, I tried to make something like that:

validator (plugin name)
ā€” composer.json
ā€” index.js
ā€” index.php
ā€” README.md
ā€” src
ā€”ā€” components
ā€”ā€”ā€” ValidatorScreen.vue

I have in Index.js

import ValidatorScreen from "./src/components/ValidatorScreen.vue";

panel.plugin("fromager/validator", {
  login: ValidatorScreen
});

And in validator/src/components/ValidatorScreen.vue I have the same thing that is in the reference, just to see if the plugin is running. But the problem is that the panel is running correctly but none of the plugins runs.

Iā€™m not sure to understand very well how to build a plugin.

I think you should have this index.js inside your /src folder. The index.js file in the plugin folder will be build by your build process: https://getkirby.com/docs/guide/plugins/plugin-setup-panel