Skip to content

Releases: StackExchange/backstage-stackoverflow

v1.3.2

17 Jun 10:29

Choose a tag to compare

Full Changelog: v1.3.0...v1.3.2

v1.3.0

02 Jun 09:33
60c9184

Choose a tag to compare

What's Changed

  • chore: we'll now retrieve questions and tags by creationDate by @EstoesMoises in #7

Full Changelog: v1.2.0...v1.3.0

v1.2.0

21 May 10:31
c68084b

Choose a tag to compare

What's Changed

  • feat: added support for Basic and Business tiers by allowing manual input of PAT by @EstoesMoises in #6

Full Changelog: v1.1.1...v1.2.0

v1.1.1

08 May 18:02
d7df3d3

Choose a tag to compare

What's Changed

Full Changelog: 1.1...v1.1.1

v1.1 - stable release

24 Mar 08:53
1976484

Choose a tag to compare

Stack Overflow for Teams Plugin for Backstage

Based on the existing Community Plugins for Stack Overflow, this version introduces three new plugins:

  • A frontend plugin responsible for displaying Stack Overflow for Teams data.
  • A backend plugin responsible for fetching and creating Stack Overflow for Teams data.
  • An optional search module responsible for fetching and creating an index of all the questions of your Stack Overflow instance.

Detailed information can be found under the plugins folder.

Frontend Plugin

It provides the UI and interacts with the backend service to fetch data from your Stack Overflow Enterprise instance.

Components

  • <StackOverflowHub />
    The below various components collectively create this informative hub.

  • <StackOverflowMe />
    Displays information about the authenticated user.

  • <StackOverflowPostQuestionModal />
    Provides a form for users to create a new Stack Overflow question. Once submitted, an API request is executed to create the question.

  • <StackOverflowQuestion />
    Retrieves questions from the API. Uses standard pagination, displaying only the first 30 API results.

  • <StackOverflowTags />
    Retrieves tags from the API. Uses standard pagination, displaying only the first 30 API results.

  • <StackOverflowUsers />
    Retrieves users from the API. Uses standard pagination, displaying only the first 30 API results.

Authentication components

  • <StackAuthStart />
    Initiates /auth/start on the backend.

  • <StackAuthLoading />

  • <StackAuthCallback />
    Receives the code and state from your Stack Overflow Enterprise instance as part of the OAuth process and initiates /callback in the backend.

  • <StackAuthSuccess />

  • <StackAuthFailed />

Page

  • <StackOverflowTeamsPage />

This page triggers authentication components, if authenticated it will return the StackOverflow HUB.

API Requests

The frontend plugin creates and API Ref for StackOverflowforTeams which can be found under /api folder. All API requests from the frontend are directed to Backstage's backend.

Backend Plugin

The backend plugin is responsible for:

  • Handling API requests via createStackOverflowApi and createStackOverflowService to the Stack Overflow instance for retrieving:
    • /users
    • /tags
    • /questions
    • Posting new questions via /questions
  • Managing OAuth authentication flow to securely access Stack Overflow. via createStackOverflowAuth

OAuth Authentication Flow

The backend is the only component that directly utilizes Stack Overflow access tokens for requests.

Authorization Flow Details

/auth/start

  • Generates PKCE Code Verifier.
  • Hashes Code Verifier to obtain Code Challenge.
  • Generates a state (random string).
  • Stores Code Verifier and State in a secure, HTTP-only cookie accessible only to the server.

/callback

  • Retrieves the stored Code Verifier and State.
  • Validates that the received state matches the one from Stack Overflow's query string parameter.
  • The backend requests an Access Token using the stored Code Verifier.
  • Stores the Stack Overflow Access Token in a secure, HTTP-only cookie.

Search module

This module for the search plugin is an enhanced version of the original Stack Overflow collator. It provides additional information while coded to work specifically with Stack Overflow for Teams API Version 3.