Nextcloud Federation "sharing" Sessions"

Hi everyone,
i’ve built a nextcloud federation for 2 locations.
My goal is to have the desktop client connect to the nextcloud server it is located at or connected to via VPN.
Both nextclouds have LDAP-logins configured and the clients are LDAP clients as well.
For my testuser I’ve created a directory on nextcloud A and shared it with the same user on nextcloud B.
When is requested, Firewall A DNS points to nextcloud A and Firewall B DNS points to nextcloud B.
The Login procedure at location A and B works as intendet. I can both see and work with the shared folder in both locations.
The only Problem I have is that the client doesn’t stay logged in if it changes from one location to the other.
Is there a way to stay logged in? Or can I change my setup so that it works differently yet gives me what i need:

  • clients connect automatically to the nearest nextcloud location
  • clients have access to the data regardless of which location they are in

    Kind Regards