Hi, recently placed by Web App into production and for some reason the Login and Logout URl’s are all pointing to localhost, instead of the domain name. I don’t know why or what I am doing wrong
These are the General settings, which I think I have done correctly. When running the node app locally, it works perfectly.
However when I uploaded the app onto a web server and ran it on nginx with a reverse proxy to port 3000. things started going wrong. I don’t know if this effected it?
Looking at your code (assuming it’s your production code), I see that appBaseUrl isn’t set correctly. It should be set to the domain of your server.
And in the Okta Admin Application settings, replace https://{domain}/authorization-code/callback with the right value for your domain (something like https://yourDomain.com/authorization-code/callback)
You can see more configuration for ExpressOIDC middleware here
My appBaseUrl i think is set correctly, and so are the Otka Admin Settings, it’s just I replaced the URL with {domain} for the purposes of uploading it onto here. But its been set to this, which is the domain,
Funnily enough, when the appBaseUrl is set to the production servers domain. The production server uses the localhost call back. So after logging using the sign in page this happens:
But when running this locally, with the very same settings and code this happens:
Its a very strange interaction that’s happening.
Both the domain and localhost are listed as trusted origins as well, so im really confused as to why this is happening.
These are my Otka Settings, without hiding the domain:
At this point I’d ask, are you sure that you are hitting your application?! This is all really strange. Is there a chance that your reverse proxy can do rewrite/reroute by any chance? Can you try to test directly hitting your application?