simulacrum
simulacrum copied to clipboard
Ability to specify domain for the custom simulator
Discussed in https://github.com/thefrontside/simulacrum/discussions/250
Originally posted by bstiffler582 January 12, 2023 When trying to containerize the auth0 simulator and run it separately from my app, I need to be able to reference the service with a domain other than "localhost". It seems as though the meta data returned from e.g. "/.well-known/openid-configuration" is hard coded as "localhost". Does the tool provide a means to change this value? I need to return something like: {"issuer":"https://host.docker.internal:4400/"... } or "https://auth0sim.local:4400, etc. otherwise my app container will be referencing itself. I believe this is the last piece I need, unless I am (quite likely) missing a bigger picture here...
@bstiffler582 it looks like it's currently using the service URL. Would it make sense to use the auth0 domain instead?
@taras to clarify - are you referencing the auth0 "audience"? Or perhaps the simulation server url? Those are the only two urls supplied when creating my simulator. Is there another property that is specifically the "auth0 domain"?
@bstiffler582, you're right; it returns the auth0 domain when you start the service. There are a few different ways to run the simulator. Which instructions are you using to containerize the service?
I am using the node:13-alpine docker image and essentially just the typescript example from the auth0 README. There are some extra steps for handling certificates, but that is outside the scope of this issue.