angular-token
angular-token copied to clipboard
signOut() not working on Chrome and Firefox
I'm submitting a...
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ X] Bug report
- [ ] Performance issue
- [ ] Feature request
- [ ] Documentation issue or request
- [ ] Other... Please describe:
Current behavior
Working on an app I'm using Angular 10 (not supported, I know). While testing on Safari 14 everything works fine. SignOut leads to signed out user. But with current Chrome and Firefox, the signOut Method doesn't sign out.
While analyzing the problem, the finalize() part in signOut() Method is never called on Firefox and Chrome. In Safari it is executed properly. I don't know why at the moment but I will try to investigate in this.
Expected behavior
User should get signed out.
Environment
Angular-Token version: 9.0.0-beta.0 Angular version: 10.2.3
Bundler
- [ X] Angular CLI (Webpack)
- [ ] Webpack
- [ ] SystemJS
Browser:
- [ X] Chrome (desktop) version 89.0.4340.0 (Chromium)
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ X] Firefox version 84.0 (64-Bit)
- [ X] Safari (desktop) version 14.0.1 (16610.2.11.51.8)
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
I've had a look at the code and found https://github.com/neroniaky/angular-token/blob/ff911a81080285e8b19939f56c7fb5d7f0ac46e7/projects/angular-token/src/lib/angular-token.service.ts#L363
signOut() returns an observable, that is never subscribed. The interesting thing is, that this seems to work on Safari and obviously on older versions of angular. Subscribing at this point shouldn't be a problem?