Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(auth): redirect to /login if not authenticated
  • Loading branch information
valorkin committed Oct 19, 2015
commit bd00b5a66152f498b596e1fd2347d794fe903807
4 changes: 2 additions & 2 deletions src/app/LoggedInOutlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export class LoggedInRouterOutlet extends RouterOutlet {
activate(instruction: ComponentInstruction) {
var url = this.parentRouter.lastNavigationAttempt;
if (!this.publicRoutes[url] && !localStorage.getItem('jwt')) {
// todo: redirect to Login
//instruction.component = Login;
// todo: redirect to Login, may be there a better way?
this.parentRouter.navigateByUrl('/login');
}
return super.activate(instruction);
}
Expand Down