Skip to content

API Endpoint Implementation: /setup #5

@Subtixx

Description

@Subtixx

Description

Implement the /setup endpoint for handling the OAuth flow for Sentry app installation. This endpoint is responsible for:

  1. Receiving the authorization code from Sentry
  2. Exchanging the code for an access token
  3. Verifying the installation
  4. Storing the installation data for future use

Current Status

The endpoint is partially implemented in src/api/sentry/setup.ts but is commented out in the main router (src/api/sentry/index.ts). The file contains the necessary code for token exchange and verification, but the database operations for storing the installation data are commented out.

Requirements

  • Implement the database models for storing Sentry installation data
  • Uncomment and update the database operations in setup.ts
  • Add proper error handling for all possible failure scenarios
  • Ensure proper logging throughout the process
  • Uncomment the route in src/api/sentry/index.ts
  • Add tests for the endpoint

Additional Information

The setup endpoint is critical for the initial integration with Sentry. Without it, users cannot properly install and authorize the application. The endpoint should follow Sentry's OAuth flow as described in their documentation.

Reference: Lines 41-115 in src/api/sentry/setup.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions