We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 548a85a commit 42f4388Copy full SHA for 42f4388
jwt-angular/src/app/auth.service.ts
@@ -111,11 +111,7 @@ export class AuthService {
111
console.log('redirect user to login');
112
// in a real app you would redirect the user to the login page
113
} else if (event.key === 'signin') {
114
- this.refreshToken()
115
- .subscribe(() => {
116
- console.log('sync sign in');
117
- window.location.reload();
118
- });
+ window.location.reload();
119
}
120
121
@@ -135,6 +131,7 @@ export class AuthService {
135
131
const accessExpiry = moment(this.accessExpiry - 1000);
136
132
const timeToWait = accessExpiry.diff(now, 'second') * 1000;
137
133
134
+ this.cancelRefresh();
138
this.scheduledRefreshSub = of(null)
139
.pipe(delay(timeToWait))
140
.subscribe(() => {
0 commit comments