File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
75
75
protected _storage : OAuthStorage ;
76
76
protected accessTokenTimeoutSubscription : Subscription ;
77
77
protected idTokenTimeoutSubscription : Subscription ;
78
+ protected tokenReceivedSubscription : Subscription ;
78
79
protected sessionCheckEventListener : EventListener ;
79
80
protected jwksUri : string ;
80
81
protected sessionCheckTimer : any ;
@@ -317,7 +318,10 @@ export class OAuthService extends AuthConfig implements OnDestroy {
317
318
this . setupExpirationTimers ( ) ;
318
319
}
319
320
320
- this . events . pipe ( filter ( e => e . type === 'token_received' ) ) . subscribe ( _ => {
321
+ if ( this . tokenReceivedSubscription )
322
+ this . tokenReceivedSubscription . unsubscribe ( ) ;
323
+
324
+ this . tokenReceivedSubscription = this . events . pipe ( filter ( e => e . type === 'token_received' ) ) . subscribe ( _ => {
321
325
this . clearAccessTokenTimer ( ) ;
322
326
this . clearIdTokenTimer ( ) ;
323
327
this . setupExpirationTimers ( ) ;
You can’t perform that action at this time.
0 commit comments