I’m currently using MetaMask as sign-in option and using Sepolia as the selected chain. So if I call web3auth.connected it returns true.
However, if I manually switch my chain on the MetaMask extension for Goerli for example, web3auth.connected will return false and web3auth.provider is null even though I refresh my page. And the only way that I found to fix this is by doing sign out and sign in.
Have you considered using web3.js to listen for the network changes event? This approach could potentially help in automatically handling the chain switch.