In reply to Tara St. Clair.

Thanks, I dig a little deeper and I found out that the example I mentioned is indeed working, the issue is when I specify an explicit port.

Example:
- My application is running on https://myapp.mycompany.com:12345/
- Viya is running on https://viya.mycompany.com/
- A new client "myapp-client" is defined with: "redirect_uri": "https://myapp.mycompany.com:12345/callback"
- The user navigates in the app and gets redirected to https://viya.mycompany.com/SASLogon/oauth/authorize?response_type=code&client_id=myapp-client&redirect_uri=https://myapp.mycompany.com:12345/callback
- The user authenticates correctly on the SASLogon page
- The user gets redirected to https://viya.mycompany.com/callback which is wrong

Very weird behavior! It completely replaces either my application domain and my application port with Viya domain and default port (unspecified, so 443).

Instead, if I do: (note the absence of the port)
- My application is running on https://myapp.mycompany.com/
- Viya is running on https://viya.mycompany.com/
- A new client "myapp-client" is defined with: "redirect_uri": "https://myapp.mycompany.com/callback"
- The user navigates in the app and gets redirected to https://viya.mycompany.com/SASLogon/oauth/authorize?response_type=code&client_id=myapp-client&redirect_uri=https://myapp.mycompany.com/callback
- The user authenticates correctly on the SASLogon page
- The user gets redirected to https://myapp.mycompany.com/callback which is correct

So somehow the custom port is bothering it... Problem is that my application runs indeed on port 12345 as in the first example, and I cannot easily move it under 443.
Is this some security check?

Thank you very much!