Using the API from frontend apps
-
Thanks for the plugin, it seems to do most of what we need! I have developed a frontend-only app for my client which should activate the generated license key through the API, but I notice that you require a secret to communicate with the API. I’m reluctant to include the secret in the frontend code, so it would be great to have a few routes that don’t require this level of security that frontend apps could use to activate or validate licenses.
Does the key/secret pair give any additional access to WordPress or Woocommerce, other than the functions of this plugin? If not, I can disable the routes I don’t need and just include the secret in the frontend code.
To be honest, this level of security seems a bit over the top and makes any other apps than server-side apps needlessly difficult to implement. I’d have to write a WordPress plugin that wraps the API and expose a custom API just to prevent the secret from leaking out, which seems counter-productive when I’m already using a plugin with an API. Even if I take the step of including the secret in the frontend code, I now need to maintain separate builds for local, dev and production sites since they each use a separate key/secret pair.
I fully understand the need to protect sensitive routes that can modify the data, but the routes that just activates or validates a key should be usable from frontend or otherwise unsecure apps.
The topic ‘Using the API from frontend apps’ is closed to new replies.