I’ve created a PHP Proxy to hide the access_token and the deviceID online. I’ve started with the Simple Spark PHP Proxy from @wgbartley , however to fully understand it I’ve reworked the code.
I decided to also hide the deviceID, so you will give less information to the end-user.
I noticed that the speed of a request is slower (about 200-300ms without proxy and around 600-700ms with). I’m curious if someone has idea’s to speed it up. I measured on my local system the same speeds. My webserver is based in the Netherlands, so maybe from the US the request speed is even slower.
I’m also curious about the security and if someone sees some improvements that I can make.
I’ve put a temporary demo online (mainly because I won’t keep the Photon with the code online). I noticed the sliders don’t work on mobile.