Description
Current behavior:
A new visitor comes to my site, I configure OAuthService and get an access token. After a certain amount of time decided by my timeoutFactor OAuthService emits 'token_expires'. (as intended)
A visitor comes BACK to my site after some time and their token has already passed the timeoutFactor (but is not yet expired). OAuthService does not emit 'token_expires'.
Suggested solution:
When an access token exists OAuthService checks that tokens expiration against the timeoutFactor as part of it's initialization. If the token has already passed the timeout factor it emits 'token_expires'
Alternative:
Calling hasValidAccessToken() will emit 'token_expires' if the token has already passed the timeoutFactor (hasValidAccessToken still returns true/false based on existing logic)