Email Account Configuration OAuth from Microsoft Office 365

the logic doesn’t poll.

whenever get_active_token() is called,

  • it’ll fetch token cache
  • check if access token is expired
    • if access token is expired, it’ll request new bearer token using refresh token, new bearer token updates the token cache and expiry of token cache
    • if valid returns access token from cache