Pub Nub has a webrtc chat plugin which allows anyone to just include the code and start chatting on their own website. As we know webRTC is javascript code and when we include that code in our website, all it does is that it calls the required javascript files needed to run that on the client browser. So when my website has fully loaded I can run the chat. How does PubNub secure its code from users. I mean, if i copy all the javascript files and put it on my server, I can run it with firebase and not use pub nub at all. The main question I am asking is that if I am developing a webRTC based text chat app and want to open up my api to outsiders so that they can use my services, how should I protect it so that they don't rip off my code and put it natively in their website.
Asked
Active
Viewed 59 times
0
-
they give it away on purpose, as should you, if you want people to pay for your impossible-to-steal backend services. – dandavis May 16 '17 at 17:28
-
that is not the answer I am seeking. I asked how can it be done so that I can educate myself and not why it should or should not be done. – Gaurav May 16 '17 at 17:32
-
it can't be done, that's the thing... – dandavis May 16 '17 at 17:55
-
Your question seems to assume Pub Nub secures their javascript, which it appears they don't. Therefore the answer you're not seeking is the answer. I mean I suppose you can try to [obfuscate your JavaScript](http://stackoverflow.com/q/194397/918910), but that's about it. – jib May 17 '17 at 00:51
-
1PubNub doesn't need to secure its JavaScript, but developers should secure their PubNub keys, but not through obfuscation (that won't stop anyone from getting the keys anyway) but through [authorization using PubNub Access Manager](https://www.pubnub.com/docs/web-javascript/pam-security). – Craig Conover May 17 '17 at 21:31