Redirect users from a different subdomain

We have a wordpress multisite install with the main domain ( just the presentation website and a subdomain ( being the ‘logged in’ website where user can access the content after they log in

Auth0 is installed on the subdomain and user can login and everything works as expected
When someone visits the main website and click login it is redirected to the subdomain ( and the auth0 login flow starts

But now when users visit (the main domain) but it has already logged in for the member subdomain we would like to have them redirected automatically to . How can we accomplish that knowing that the cookies are set for the subdomain ?