App won't connect through nginx reverse proxy

I’ve set up a reverse proxy using the instructions here: Reverse proxy using NGINX , it is working fine using the browser but if I try and connect using the app on Android over a mobile connection, it switches to the browser (Firefox) and gives the error “Unable to connect to Home Assistant, Retrying in 60 seconds…”. The difference is the URL has external_auth=1 at the end.

I’ve tried searching for the error and trying a few fixes suggested, including making sure websockets connections are working, but none of the suggested changes have made a difference. Any suggestions?

I think I found the problem, I had written http:// for the server address in the app, if you use this address in a browser it is redirected to https:// but this must have caused a problem here. I changed the server address to https:// and it is working