If you’re using 1 Oauth App, you’ll need to redirect to the respective environment by whitelisting your environment domain names—can you confirm you’ve whitelisted these in your app? Due note that the Redirect URL and whitelist URLs need to have the same base domain. So you should add a sub domain redirect for each environment.