angular-token icon indicating copy to clipboard operation
angular-token copied to clipboard

signInStoredUrlStorageKey does not get set when stale values exist in local storage

Open rrjohnson85 opened this issue 7 years ago • 3 comments

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

When signInStoredUrlStorageKey is set and stale authData exists in local storage, the URL to redirect to does not get set in local storage.

Expected behavior

I would expect that the URL to redirect to gets set in local storage, within reason. For example if the authData is set and the expiry is clearly expired, the URL should be stored.

What is the motivation / use case for changing the behavior?

If a user does not sign out, but rather lets their session expire or simply closes their browser, the redirection does not work.

Environment

Angular-Token version: 7.0.1 Angular version: 7.1.2

Bundler

  • [x] Angular CLI (Webpack)
  • [ ] Webpack
  • [ ] SystemJS

Browser:

  • [x] Chrome (desktop) version XX
  • [ ] Chrome (Android) version XX
  • [ ] Chrome (iOS) version XX
  • [ ] Firefox version XX
  • [ ] Safari (desktop) version XX
  • [ ] Safari (iOS) version XX
  • [x] IE version XX
  • [x] Edge version XX

rrjohnson85 avatar Feb 14 '19 18:02 rrjohnson85

I'd be more than happy to take some time and correct the behavior if PR's are welcome. Just let me know.

rrjohnson85 avatar Feb 14 '19 18:02 rrjohnson85

Hi, thanks for opening this issue. PRs are always welcome :).

neroniaky avatar Feb 20 '19 08:02 neroniaky

@neroniaky finally added a PR, but need to finalize tests.

rrjohnson85 avatar May 17 '19 14:05 rrjohnson85