I have two Next.js projects. The first project is the client application running on port 3000, and the second project is the owner application running on port 4000. I want to implement redirection or multiple zones.Both projects have their own NextAuth authentication systems.
My goal is to redirect the client to the client project when they attempt to access the owner's page. Additionally, if the client tries to log in to the owner's page and provides their credentials, I want them to stay on port 3000. I'm using NextAuth for authentication, but it currently redirects me to port 4000.by the way each of them need to have custom login.