I am facing a problem with my project while using cookies for authentication. My project has an API (NodeJS) and I have 3 clients (ReactJS).
Let's say that my API runs on api.example.com and serves all of my clients. My first client runs on example.com my second one on second.example.com and my third one on third.example.com.
Is there a way to prevent cookies from being shared across subdomains? This creates problem with role permissions between the systems. Thank you for your help. If you need more clarifications please comment below!