iOS app login flashes a browser sheet and closes when the server is behind a Cloudflare Tunnel / Zero Trust
From outside my network, the iOS app accepts my server address and shows the server confirmation, then a browser window flashes up and disappears without ever giving me a login form. Logging in through a browser on the same device to the same URL works fine. The server is a Docker container behind a Cloudflare Tunnel with Zero Trust in front of it.
Resolution: Cloudflare Zero Trust / Access uses a cookie-based auth flow that the mobile apps cannot complete -- the app's auth web view never gets a usable session, so it closes immediately, even though a full browser handles the same flow fine. Separately, the iOS app refuses non-local plain HTTP connections (an iOS App Transport Security restriction), so any remote server must be served over HTTPS. Fix: put an ordinary reverse proxy in front of Storyteller instead of an identity proxy -- terminating TLS with Caddy and proxying to the container resolved this. Equivalent working setups are a DNS record for your host plus Caddy/nginx on the machine running Docker, or reaching the server over Tailscale, for which there is a guide in the Storyteller docs. If you do not have a static IP, keep the DNS record current with something like ddclient.