Redirect post login mismatch

My application have a multilingual links and I pass window.location.href as the redirect_uri with loginWithRedirect. I first land at localhost:8000/en/blog and then I change it to localhost:8000/ja/blog and finally I login with auth0 but somehow in the console after authorization it is showing redirected to localhost:8000/en/blog.
PS: Its a Gatsby website