Added new auth redirect code for ssr.

This commit is contained in:
Michael W Spalti
2019-09-17 12:44:02 -07:00
parent 8fe617bd74
commit e70b9c5994
2 changed files with 11 additions and 6 deletions

View File

@@ -368,7 +368,7 @@ export class AuthService {
}
private navigateToRedirectUrl(url: string) {
protected navigateToRedirectUrl(url: string) {
// in case the user navigates directly to /login (via bookmark, etc), or the route history is not found.
if (isEmpty(url) || url.startsWith(LOGIN_ROUTE)) {
this.router.navigate(['/']);