I have an application trying to use this image currently I have some tests failing because the issuer url does not match due to the application being spun up on a dynamic port using test containers, so my application has an issuer url of: http://localhost:62847/local_2D4gvA2k but the token is being generated using: http://localhost:9229/local_2D4gvA2k due to the hostname and port being hardcoded here which is causing my authentication attempt to fail.
I have attempted to fix in this PR. I am not overly happy with the duplication in the fix, so it could be cleaner, but I think it might do the job in the short term?!
My current work around is to have my automated tests start the cognito container fixed to port 9229, but it would be better and more robust to be able to spin it up on any free port.
I have an application trying to use this image currently I have some tests failing because the issuer url does not match due to the application being spun up on a dynamic port using test containers, so my application has an issuer url of:
http://localhost:62847/local_2D4gvA2k
but the token is being generated using:http://localhost:9229/local_2D4gvA2k
due to the hostname and port being hardcoded here which is causing my authentication attempt to fail.I also noticed a similar issue here too.
I have attempted to fix in this PR. I am not overly happy with the duplication in the fix, so it could be cleaner, but I think it might do the job in the short term?!
My current work around is to have my automated tests start the cognito container fixed to port 9229, but it would be better and more robust to be able to spin it up on any free port.