This PR adds a configuration option to disable scheduling a refresh.
I am not a JavaScript developer and this is literally the first TypeScript I've written, so please be gentle. I've tested locally but I am only running in the context of tokens obtained outside of this middleware... so take a close look in review.
Thanks for this excellent little library.
I am using this in a React Native project, and
setTimeout()
isn't really advisable in that context/doesn't make as much sense as it may in say, a browser. See https://github.com/facebook/react-native/issues/12981#issuecomment-652745831 for further.This PR adds a configuration option to disable scheduling a refresh.
I am not a JavaScript developer and this is literally the first TypeScript I've written, so please be gentle. I've tested locally but I am only running in the context of tokens obtained outside of this middleware... so take a close look in review.