1. 12 Aug, 2021 2 commits
    • Robert Knight's avatar
      Simplify `state` string generation mocking · e1e43428
      Robert Knight authored
      Now that we have good support for mocking imports in tests, we can use
      that to mock `generateHexString` calls in `OAuthClient` rather than
      needing to have a test seam in the class.
      
      This improves test coverage slightly.
      e1e43428
    • Robert Knight's avatar
      Refactor token fetching and error handling in OAuthClient · 8040bf0d
      Robert Knight authored
      Prepare for upcoming improvements to handling of network errors across
      the client by refactoring some `fetch` requests and error handling in
      OAuthClient.
      
       - Extract duplicated logic for fetching an access token into a
         `_getAccessToken` method.
      
       - Create a `TokenError` class to wrap all errors that may be thrown
         when fetching or revoking an access token. This makes it easier for
         downstream consumers to handle such errors in a uniform way.
      
         The `TokenError` error links to the network or other error that
         caused it via the `cause` property, following the convention
         currently being standardized in https://github.com/tc39/proposal-error-cause.
      8040bf0d
  2. 11 Aug, 2021 3 commits
  3. 10 Aug, 2021 2 commits
  4. 09 Aug, 2021 18 commits
  5. 06 Aug, 2021 4 commits
  6. 05 Aug, 2021 10 commits
  7. 04 Aug, 2021 1 commit