Cannot open HA after using 2 factor authorisation - Solved

Hi there

After getting notified about failed login attempts every couple of seconds, I thought I’d turn on 2FA.
It was fine. I could log out and log back using google authenticator.
But the next time I had to restart HA, it failed to come back up.
When connecting via my duckdns, it refuses access.
I can still login using http://192.168.xx.xx:8123 and I turned 2FA back off again and re-started. But it still won’t connect via my duck dns.

Anyone have any suggsetions on where to start fixing this?

It is HA running on a Pi.
It is on 2022.3.5

This is the error if I try to log in via my duckdns url

image

Many thanks

What if you use http:// instead?

Thanks for the suggestion. But no, that didn’t work.
But after removing a rogue space in my configuration.yaml, it is all back working again.