Open
Description
Right now tokens are cached until its expiration time (which is also a problem - see #48). If during the time it gets expired, OAuth2 server is unavailable, then application is completely blocked, because it cannot obtain new token.
Possible solution - background process, which tries to obtain new token in some configured period. E.g. if the token expiration is in 12h, then first try to get new token 4 hours before expiration, if that fails then in 2 hours from expiration, then 1, 0:30, 0:15, 0:10 etc.