Configure multiple domains with NextJS

Problem statement

Customer try to dynamically configure two different domains for the same application, on two different languages. They were using Next JS. The issue is that they are using the same redirect URL in both domains.

Solution

You have a couple of options: