Skip to content

Incorporate OAuth retry logic from conformance helpers into SDK #1370

Closed

Description

@bhosmer-ant

Context

In PR #1360 (client conformance testing), there's a TODO comment in src/conformance/helpers/withOAuthRetry.ts:30-31:

// TODO: this retry logic should be incorporated into the typescript SDK

The conformance test helper implements OAuth retry logic that:

  1. Handles 401/403 responses by attempting re-authentication
  2. Extracts resourceMetadataUrl and scope from WWW-Authenticate headers
  3. Automatically retries the request after obtaining fresh tokens
  4. Handles the authorization code flow including redirect handling

Suggestion

Consider incorporating this retry pattern into the SDK's withOAuth middleware or as a separate utility, so SDK users don't need to implement this logic themselves.

Related

Activity

  1. added
    enhancementRequest for a new feature that's not currently supported
    ready for workEnough information for someone to start working on
    P2Moderate issues affecting some users, edge cases, potentially valuable feature
    on Jan 28, 2026
  2. added 2 commits that reference this issue on Mar 11, 2026
    6b9cb53
    57c7c85
  3. pcarleton commented on Mar 30, 2026

    @pcarleton
    Member

    closing this for now, as i'm not sure of the future of the middleware pattern in v2 and don't want to add more work to it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Moderate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedready for workEnough information for someone to start working on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions