RocketChat and simplesamlphp configuration issue

Source: https://docs.rocket.chat/guides/administrator-guides/authentication/saml (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[‘https://rocket.my.com/_saml/metadata/simplesaml’]” so it’s getting the wrong url info

The auth process works perfectly but then redirects back to localhost address
localhost:3000/home?saml_idp_credentialToken=id-gWjMQQn7bTLbvf6S9

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