A little problem with NextJS 15 AuthJS 5-beta and identityServer4

I'm trying to implement SSO in NextJS 15 (app router) with AuthJS 5 using IdentityServer4 provider, it all works on localhost but when I deploy it and run signIn() function it should redirect me to callback URL on the same website but it redirects me to https://localhost:3000 instead, I have already set AUTH_URL env and AUTH_SECRET but it still does the same thing what could possible be the solution?