[ ] question about the decisions made in the repository
Issue description
I recently added the nebular authentication module following the instructions.
Using a dummy authentication provider, it worked as expected, unfortunately, after upgrading my node version to 8.9.4 (previously was 6.3) and npm to 5.6 (previously was 3.10). the authentication stopped working. When I type username&password, the page loads and fails to navigate to the home page (isAuthenticated returns false).
While trying to debug the issue, I noticed the auth service returns a null token, and this is the reason why the authetication fails.
Related code:
auth-guard.service.ts
import { Injectable } from '@angular/core';
import { CanActivate, Router } from '@angular/router';
import { NbAuthService } from '@nebular/auth';
import { tap } from 'rxjs/operators/tap';
@Injectable()
export class AuthGuard implements CanActivate {
constructor(private authService: NbAuthService, private router: Router) {
}
canActivate() {
return this.authService.isAuthenticated()
.pipe(
tap(authenticated => {
if (!authenticated) {
this.router.navigate(['auth/login']);
}
}),
);
}
}
Issue type
Issue description
I recently added the nebular authentication module following the instructions. Using a dummy authentication provider, it worked as expected, unfortunately, after upgrading my node version to 8.9.4 (previously was 6.3) and npm to 5.6 (previously was 3.10). the authentication stopped working. When I type username&password, the page loads and fails to navigate to the home page (isAuthenticated returns false). While trying to debug the issue, I noticed the auth service returns a null token, and this is the reason why the authetication fails.
Related code:
auth-guard.service.ts
app.module.ts
package.json.txt
Am I missing something? Thanks in advance.