-
Notifications
You must be signed in to change notification settings - Fork 10.4k
SPA web app is not managing images and login properly when running from remote browser #112
Comments
Ok. Both issues (images & login) solved in commit 12ecc78 Important: Currently SPA nor our IdentityServer configuration supports running SPA from two different origins. Reason of this is because our current configuration for IdentityServer only allows one supported redirect url for a specific client (the redirect url is the uri where identity server will redirect the user after a successful login. It is set by the client and checked by IdentityServer. Note that IdentityServer supports multiple redirect urls per client, it is just our current configuration that do not). Another change I did is to use a environment variable in the docker-compose.prod.yml file to set the external IP. So, there is no need to edit this file to put your correct IP in it. |
I'm not sure I like to use an environment variable (for the the external IP) at the server level used in the docker-compose.prod.yml file to set ALL of the microservices... Basically, do you think there is any possibility that any of the microservices could use a different external IP or DNS name within the same deployment in a hypothetical orchestrator/cluster like Docker Swarm? probably not..., then using this ENV-VAR per deployment environment would be right. Probably, this is right. For having a different external IP or DNS name you'd need a different deployment environment in which case you could also specify a different external IP or DNS name for that different deployment, as well. (Also, we shouldn't explicitly say just "IP", as it could also be a DNS "server name" if deployed in production, but that is a minor detail) |
Confirmed from y side. I think the env-var approach is right for the external IP or DNS NAME across all the microservices under the same docker-compose deployment as they will share the external Docker Host IP or DNS Name or even if it were a cluster or Docker Swarm, the external DNS name would also be the same. I even went further so in order not to make complex setup instructions with multiple ways to set an environment variable depending on your deplpyment environment (Windows, Mac, Linux, Cluster/Swarm, etc.) I'm using the ".env" file to set the by-default env-vars. As a reminder, this deployment configuration using the docker-compose.prod.yml file has to be used when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. Like remote browsers and remote devices. Closing this ISSUE for now, as I tested it and it is working successfully in my tests. |
When deploying the "prod" environment (using docker-compose.prod.yml with external IPs that you need to change depending on your host machine), the MVC app works OK from a remote browser.
However, the SPA app is not showing the catalog images neither being able to authenticate agains the STS container (IdentityServer4).
An URL like this show no images:
However, if running the same deployment but using the URL http://localhost:5104/catalog then the images show up properly, but the authetication page show an error:
Sorry, there was an error : unauthorized_client
Request Id: 0HL37FHCF72NO
The text was updated successfully, but these errors were encountered: