I'm trying to setup OHIF Viewer, to use IdentityServer4 as its OpenId-Connect server. I created an IdentityServer4 project and setup OHIF at my development machine, and everything works fine at localhost.
Then I deployed both projects to server. I chossed ohif.my-domain.com
for the client (ohif viewer), and login.my-domain.com
for the identity server. Configurations for both client and server are updated against the new domain names.
But when trying to login, server redirects to incorrect URL after login. It redirects to login.my-domain.com?code=...
however, it should redirect to ohif.my-domain.com?code=...
as you can see in the following screen shot:
After making sure that every configuration is setup correctly, I changed the domain name of the server (only the domain name, everything else are the same) to is.my-other-domain.com
, and it started to work properly. And now redirects to ohif.my-domain.com
as expected.
The question is that am I missing something to get IdentityServer4 to work as expected while using same domain with different sub-domains for my client and server?
Thanks for any help