X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Frouting%2Flogin-guard.service.ts;h=40ff8f5059491177fd9695e01ec22c675aed81cc;hb=0b4e5fe32708afce54212810738aa4d0c3dc178d;hp=18bc41ca6301e9e8811f851dbd3c7cf256b33356;hpb=954605a804da399317ca62afa2fb9244afa11ebf;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/routing/login-guard.service.ts b/client/src/app/core/routing/login-guard.service.ts index 18bc41ca6..40ff8f505 100644 --- a/client/src/app/core/routing/login-guard.service.ts +++ b/client/src/app/core/routing/login-guard.service.ts @@ -20,6 +20,8 @@ export class LoginGuard implements CanActivate, CanActivateChild { canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { if (this.auth.isLoggedIn() === true) return true + this.auth.redirectUrl = state.url + this.router.navigate([ '/login' ]) return false }