-
Hiya,
I want to run FusionAuth and the backend app in Docker, but run into an issue with this quickstart: https://github.com/FusionAuth/fusionauth-quickstart-javascript-express-web/
When I modify the complete-application/.env file to have the value for
fusionAuthURL=http://localhost:9011the token exchange fails (because the dockerized express app doesn't know how to get to FusionAuth).When I set
fusionAuthURL=http://fusionauth:9011wherefusionauthis the internal docker network domain name of the FusionAuth server, the initial redirect fails, because my browser doesn't know about that domain (not being in Docker).How can I fix this?
-
You can create two values for the FusionAuth url:
internalFusionAuthURL="http://fusionauth:9011" externalFusionAuthURL="http://localhost:9011"So basically whenever you are sending the redirect to the browser (pretty much just the authorize and logout URLs) you use externalFusionAuthURL which references localhost.
When you are communicating with FusionAuth from the application backend (the express app) you use the internalFusionAuthURL which references the docker domain name.
I tested that out and it seems to work fine.
Give that a try.
-
D dan has marked this topic as solved on
-
D dan moved this topic from Q&A on
-
D dan moved this topic from Frequently Asked Questions (FAQ) on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login