Id token isn't returned in case of app replication

I have 2 apps, admin and API
Admin calls API to get user info, if not found user is redirected to OKTA login page and after the user enter valid username/password then he is redirected to API which set id token in a cookie and redirects the user to admin
this flow is working fine until I replicate the API to more than one node, in this case, login isn’t working, OKTA server isn’t returning the Id token
any clue how can I solve this issue?

I’m not sure I understand whats going on here. How are you currently handling application login? Are you forming an /authorize request? If so, are you seeing any network or console errors when the login fails?

Also, are you using one of our SDKs?