Like use a server side program (Python, PHP, Java, etc.) to run the logic for your game. Then communicate with that program via WebSockets. Then your clients would make a request like: "shoot at position x,y" and the server would take that request, apply the randomization at the time of request receipt, and determine if there is another object at r(x),r(y) at the time that the request is received and turn around and push the same results to all clients.
You should be able to do the same thing with an authoritative client, but it seems easier to work in another more robust language than JavaScript.
I can give you a guide on how to setup your own servers and point you to programming resources. I have been hesitant to post a guide on how to setup and run authoritative servers because I don't want to step on Scirra's store. Feel free to PM me though, and I will send you information.