This tutorial uses Cloudflare Tunnels to allow you to connect to your Home Assistant instance without opening ports to the intertet, it also guide you on adding client certificates (mTLS), allowing only you to access your instance, and fully compatible with the companinn app.
Important
Client certificates do not work properly on IOS. You still can use Cloudflared to allow remote access.
2016 bug
HA Issue
Note
If you are not using (/dont want to use/) Cloudflare tunnels, or you want to use other services, HA offers ssl_peer_certificate to validate clients in a similar way.