`mSelfHostedURL` could be a non valid uri here, for instance `mSelfHostedURL=dh.wpmt.co` (without scheme), the next line won't add the domain to the trusted domain table and then the user will be stuck in a loop:
https://cloudup.com/cMWlHpUpFmn