diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts index 8d312e32fd..02c55dc90a 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/login/login.component.ts @@ -118,7 +118,7 @@ export class LoginComponent implements OnInit { // It's important that we do a replace here so that when the user hits the back arrow on the // browser they get sent back to where it was on the app instead of to an endpoint on this // component. - const redirectUrl = `${window.location.origin}${apiAuthorizationPath}`; + const redirectUrl = `${window.location.origin}/${apiAuthorizationPath}`; window.location.replace(redirectUrl); } } diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Login.js b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Login.js index 3954657f30..68d9509e4e 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Login.js +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/Login.js @@ -118,7 +118,7 @@ export class Login extends Component { } redirectToApiAuthorizationPath(apiAuthorizationPath) { - const redirectUrl = `${window.location.origin}${apiAuthorizationPath}`; + const redirectUrl = `${window.location.origin}/${apiAuthorizationPath}`; // It's important that we do a replace here so that when the user hits the back arrow on the // browser they get sent back to where it was on the app instead of to an endpoint on this // component.