Skip to content

Commit 42f4388

Browse files
committed
Simply reload
1 parent 548a85a commit 42f4388

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

jwt-angular/src/app/auth.service.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ export class AuthService {
111111
console.log('redirect user to login');
112112
// in a real app you would redirect the user to the login page
113113
} else if (event.key === 'signin') {
114-
this.refreshToken()
115-
.subscribe(() => {
116-
console.log('sync sign in');
117-
window.location.reload();
118-
});
114+
window.location.reload();
119115
}
120116
}
121117

@@ -135,6 +131,7 @@ export class AuthService {
135131
const accessExpiry = moment(this.accessExpiry - 1000);
136132
const timeToWait = accessExpiry.diff(now, 'second') * 1000;
137133

134+
this.cancelRefresh();
138135
this.scheduledRefreshSub = of(null)
139136
.pipe(delay(timeToWait))
140137
.subscribe(() => {

0 commit comments

Comments
 (0)