problem with authentication
-
hi! i hope everything is going well,
I gave my new plug in to some beta testers, and 2 of them reported the same issue.
In the plug in i added an authorization script with activation keys.I used the "simple copy protection" example that christoph made, and modified it.
It works well in the 4 computers i tried it with, but someone reported that every time they load the plug-in it asks for the key.
in my code i use Engine.loadFromJSON("../RegistrationInfo.js"); and dump to write.
They also said that it didn't ask to re-locate samples, but only asked for the key, which means that the plug in couldn't read ("../RegistrationInfo.js"). I tried also giving them a version with the "use global appdata folder" activated but they had the same issue.
Both of the users are on windows, one using FL Studio, and the other one Maschine 3.
I tought a lot about it but i can't find a solution to that problem, since the plug in should be able to read that file, and on my pc it does. -
@pede How are you putting the file on the user's system?
-
@d-healey thanks for the fast reply.
I'm using Engine.dumpAsJSON(data, "../RegistrationInfo.js"); i use it on the submit button, if the key is valid, (i check it with an api call) it puts the key in the registrationInfo for the offline check.I know the online check work because they runned out of activations.
On my pc registrationinfo is in the same folder as linkwindows.
But for the users that got the issue, the plugin is not asking to locate the samples, only for the key.
That's why i am really confused -
@pede said in problem with authentication:
Engine.dumpAsJSON(data, "../RegistrationInfo.js");
Where does this place the file on the user's system? Is it in AppData?
-
@pede usually yes, appdata/roaming/myCompany/MyPlugin
but to troubleshoot i tried to activate use global appdata folder windows, and now it places them here: C:\ProgramData\myCompany\MyPlugin. but the user still needed to activate again the plug in every time. -
@pede instead of using dumpAsJson you might have better luck using the file and file system APIs.
-
@pede thanks, but how do i write in a folder without using dumpAsJson? i managed to modify the script, now it's able to read files and it works, but i am struggling to find a way to actually create the file and put the information in it.
-
@pede sorry i saw only now writeString, that should be easy. thanks and sorry for my ignorance
-
@pede I think
writeObject
andloadAsObject
are probably the functions you need.