File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,13 @@ export class AuthService {
48
48
}
49
49
} ) ;
50
50
51
- // This is tricky, as it might cause race conditions (where access_token is set in another
52
- // tab before everything is said and done there.
53
- // TODO: Improve this setup. See: https://github.com/jeroenheijmans/sample-angular-oauth2-oidc-with-auth-guards/issues/2
51
+ // THe following cross-tab communication of fresh access tokens works usually in practice,
52
+ // but if you need more robust handling the community has come up with ways to extend logic
53
+ // in the library which may give you better mileage.
54
+ //
55
+ // See: https://github.com/jeroenheijmans/sample-angular-oauth2-oidc-with-auth-guards/issues/2
56
+ //
57
+ // Until then we'll stick to this:
54
58
window . addEventListener ( 'storage' , ( event ) => {
55
59
// The `key` is `null` if the event was caused by `.clear()`
56
60
if ( event . key !== 'access_token' && event . key !== null ) {
You can’t perform that action at this time.
0 commit comments