Here is a diagram. Everything works until one of the nodes fails. With the fall of Nextcloud APP01. Everyone switches to Nextcloud APP02. Authorization is working.
Turn on APP01 and turn off APP02 Authorization error.
Turn on APP02 and turn off APP01 running.Authorization is working.