-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(auth): fix isAuthenticatedOrRefresh
to not refresh token with n…
#708
Conversation
b64537b
to
28ec4d9
Compare
Codecov Report
@@ Coverage Diff @@
## master #708 +/- ##
==========================================
+ Coverage 72.96% 73.18% +0.22%
==========================================
Files 179 176 -3
Lines 4867 4800 -67
Branches 368 367 -1
==========================================
- Hits 3551 3513 -38
+ Misses 1244 1215 -29
Partials 72 72 |
@@ -51,7 +51,7 @@ export class NbAuthService { | |||
return this.getToken() | |||
.pipe( | |||
switchMap(token => { | |||
if (!token.isValid()) { | |||
if (!token.isValid() && token.getValue()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (token.getValue() && !token.isValid())
makes more sense according to me (and maybe better performance ?)
@nnixaa i agree with the code you wrote.
|
fix for #687