My plugin has the streams shown in the diagram below:

The requirement is to complete the onclick transaction after authentication. That is , only if the owner of the domain that contains page.html registered on my website (for example www.MyPluginJS.com/register ), can he use MyPlugin.js.
My registration portal issues a Client ID after successful registration.
My question is:
- What is the best approach I need to use to secure my
onclick transaction? - What are the other options (e.g. MD5 fingerprint), can I require the transaction to be executed reliably?
- Are there any existing frameworks (like OAuth) that I can use?
I need people not to use MyPlugin.js that are not registered.
I have no security experience, but I can manage the code.
Thanks in advance:)
source share