By default the CM_HOST value in the init.ps1
file of a XM Cloud project is set to xmcloud.localhost
. I want to change this name to, for example xmcloudserge.loca.lt
.
If I change the name I get a problem with the authentication from https://xmcloudserge.local.lt
to sitecorecloud.io, which contains a hard reference to xmcloud.localhost
as a return URL:
https://auth.sitecorecloud.io/authorize?client_id=we67e2gGRO0HIfglz23Yypp4T5Rshu86&response_type=code&scope=openid%20profile&state=OpenIdConnect.AuthenticationProperties%3DE7FEVVpMc5sJM8SLjOlOU_m73gkTqvOfFxs2LrcnaZdSrX3MRF_Q12ZyVDpbKIXZhDDWImasq51g1-y5BGIXOsq21vxGGb8FJjz12NttbaecPcQ8z9Kd0Fnrv5yZmRk0Fjf3TntIMUw2WT628TXtyfEeHhJ8gbaem0rO08GVln8TwzKDJR4qEg7nxqEbucvf7Bt1KMCg_FjD0VdxC2m1hq0WEZ5zfKLTTf_fYOg0-d0&response_mode=form_post&nonce=638012677311361499.Y2ZmMWYzMjUtNjRkZS00NDJjLWI0YzctZjZmZWNmOWUyZWRiZGIwZGE5NzEtNDYwMS00YmU0LWJlMzItZTU5MWVmNDc5MDBj&redirect_uri=https%3A%2F%2Fxmcloudcm.localhost%2Fidentity%2Fsignin-auth0&organization_id=&returnTo=https%3A%2F%2Fxmcloudcm.localhost%2Fsitecore&x-client-SKU=ID_NET461&x-client-ver=5.3.0.0
If I change the returnTo
query-string parameter to https://xmcloudserge.local.lt
I get the following error:
Callback URL mismatch.
The provided redirect_uri is not in the list of allowed callback URLs.
Please go to the Application Settings page and make sure you are sending a valid callback url from your application.
which sounds logical, because the return URL must be whitelisted.
The reason I want to do this is because I want the Sitecore container to be accessible to the outside world, for example by using a local tunnel with the tool localtunnel
as follows:
lt --local-host xmcloudserge.loca.lt --port 443 --allow-invalid-cert --local-https -s xmcloudserge
Which should result in the URL https://xmcloudserge.loca.lt
mapped to the same URL on my local machine.
Any ideas to accomplish this are greatly appreciated...