RocketChat and simplesamlphp configuration issue

Source: (Great Docs!!)
Setting up SAML in the UI
Getting metadata to put in simplesamlphp with domain/_saml/metadata/simplesaml/
This generated output is providing wrong urls.
I assume this is the problem, but can’t figure out how to fix it
1st line in saml20-sp-remote.php is:
“$metadata[‘’]” so it’s getting the wrong url info

The auth process works perfectly but then redirects back to localhost address

Server Setup Information

  • Version of Rocket.Chat Server: 3.4.2
  • Operating System: Ubuntu 18
  • Deployment Method: TAR
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v12.18.3
  • MongoDB Version: v4.0.19
  • Proxy: Nginx
  • Firewalls involved: UFW disabled

Any help / suggestion would be a big help. Can provide parsed generated meta file on request