2 Commits
Author SHA1 Message Date
Gerhard Scheikl c4aae01209 tunnel: clear stale kill-switch key on subdomain rename
When a user renames their tunnel subdomain, the upsert (onConflict=user_id)
overwrote the tunnels row in place, but the old subdomain's Redis
tunnel:active:<sub> flag was never cleared. The edge tunnel-active gate kept
serving the stale flag for up to its ~30s TTL, after which it fell back to a
Postgres miss and (currently) returned a misleading suspended response.

Capture the user's previous subdomain before the upsert and, when it changes,
DEL the old kill-switch key (new clearTunnelActive helper) so the edge gate
immediately stops treating the old subdomain as a live tunnel.
2026-06-02 22:57:13 +02:00
Gerhard Scheikl 2c2afa458e feat(device): OAuth2 device-pairing flow for HA add-on (code/approve/token/tunnel + /activate) 2026-06-01 10:35:41 +02:00