Redirects from external services

How should I handle redirects back to localhost? e.g. Using Auth0 I set the redirect to localhost but it fails in my CodeSpaces build. Can I rely on the Code Spaces browser URL not changing?