You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all,
I would like to ask how I can get true/false from NbAuthService.isAuthenticated()? The problem now is it always returns the Observable so my if() is always true even I haven't logged-in yet (suppose false if haven't logged-in yet)
if (this.nbAuthService.isAuthenticated()) { console.log('run here2'); return true; }
Best regards
The text was updated successfully, but these errors were encountered:
Hey @nnixaaisAuthenticated() is never returning true or false.
It return the token value (a string for example) or null.
It comes from token && token.getValue() which not produce a boolean but the right part if the first is not null.
by: @dzungdev
moved from: akveo/ngx-admin#1298
Hi all,
I would like to ask how I can get true/false from NbAuthService.isAuthenticated()? The problem now is it always returns the Observable so my if() is always true even I haven't logged-in yet (suppose false if haven't logged-in yet)
if (this.nbAuthService.isAuthenticated()) { console.log('run here2'); return true; }
Best regards
The text was updated successfully, but these errors were encountered: