Art-of-WiFi / UniFi-API-client

A PHP API client class to interact with Ubiquiti's UniFi Controller API
MIT License
1.09k stars 217 forks source link

WebRTC/Cloud Based Auth #180

Closed davidplappert closed 1 year ago

davidplappert commented 1 year ago

It would be a lot easier for administration if we could figure out a way to auth with the unifi cloud (unifi.ui.com) to get access to the API of our controllers.

This library already has something setup: https://github.com/delian/node-unifiapi

I've read about the headaches of WebRTC with PHP, and I understand the power of stateless async calls, and I want to keep that (because I'm using this in a serverless AWS Lambda function) but still have the ease of just authing to the unifi cloud instead of having to have direct access to each unifi controller (namely UDM-Pro w/ UniFi OS).

Thanks!

malle-pietje commented 1 year ago

WebRTC simply isn't supported by PHP. Even though Node.JS (Javascript) does support WebRTC please take not of the warning there: https://github.com/delian/node-unifiapi#warning

So in short; just not possible with PHP and also quite unreliable with Node.JS.