I'm not sure if I have used the right terminology here but Is there a way I can get the base URL of my app?
My problem Is I have a login service that has a hardcoded redirectUrl now when I'm in development, I'm obviously using http://localhost:4200
but when I've published I'm using my website name https://mywebsite.com
now Is there a way I can grab that and not anything after so like If I go to https://mywebsite.com/thisadad
I only get back https://mywebsite.com
?
Now I know I could have a function on the ngOnit of my app.component where I grab the URL on first load pass it to a service and then use it throughout the app but that wont work If I say enter the page at https://mywebsite.com/newpage
is there a better way to do this??
The reason I'm using a hardcoded redirect is because I'm using auth0 as my authetication
Any help would be appreciated