I'm having a WordPress theme which users can purchase. You are allowed to use one single license on a single website and I'm identifying websites by their domains. A single purchase is identified with a secure UUID.
I am trying to get a secure solution for enforcing this constraint -- you can use and receive updates for that theme only from a single, pre-configured domain.
I'm also having some constrains:
- can't use obfuscated code in any way, that is security through obscurity is not an option for me
- users are able to swap domains for their licenses, which is done on a separated dashboard
The question is, what are options for doing that?
The simplest thing that comes to my mind is to send the secret UUID and the current domain (which I extract from DB -- that's how WordPress works) as a payload to every request I send from theme to the API I have on the side. This looks very fragile to me and not secure at all.
Are there any other options I can consider?
I'm not asking for WordPress specific (and PHP, at all) solutions. I'm just looking for techniques that can help in those situations.
Thanks.