jwt-autorefresh
jwt-autorefresh copied to clipboard
Cannot properly handle errors in refresh()
Hello, First of all thank you for creating this package, I'm finding it very useful. I'm having an issue with gracefully handling the error when refresh() fails to produce a valid token. Returning a resolved promise from refresh() with no token causes _schedule() to throw internally. A rejected promise from referesh() is re-thrown in execute(). In both cases the resulting rejected promise cannot be handled in user code resulting in an unhandled rejection error.
@apomortsev - thanks for reporting, I'll get a unit test in to try and repro your findings and get it patched up (today / this weekend depending on time).
Lost track of this one. Planning to get back to it after I get v2 out for https://github.com/noderaider/redux-idle-monitor
hi @apomortsev did you find any alternatives?
Hi @puneetverma05, no, not at the time. But it's been some time and chances are there might be some similar or more suitable packages around, but I never checked.