Skip to content

Conversation

@DevelopmentCats
Copy link
Contributor

@DevelopmentCats DevelopmentCats commented Oct 28, 2025

Adding support for Backstage's new backend system (v1.20+) while keeping the old backend working too.

  • New module.ts file for new backend plugin system
  • Moved OAuth callback from /api/auth/coder to /api/coder (the /api/auth/* path expects a full auth provider implementation, which Coder doesn't have yet)
  • Updated README with instructions for both backend systems
  • Frontend updated to match new callback path

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the OAuth callback endpoint path from /api/auth/coder/oauth/callback to /api/coder/oauth/callback and adds support for Backstage's new backend system (v1.20+) while maintaining backward compatibility with the legacy backend system.

Key changes:

  • Updates OAuth redirect URIs in both frontend and backend components to use the new /api/coder/oauth/callback path
  • Introduces a new backend plugin module (module.ts) for the new Backstage backend system with proper authentication policies
  • Adds comprehensive documentation for both new and legacy backend system setup

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
plugins/backstage-plugin-coder/src/components/CoderAuthForm/CoderAuthInputForm.tsx Updates frontend OAuth redirect URI to match new backend path
plugins/backstage-plugin-coder-backend/src/service/router.ts Updates backend OAuth redirect URI construction to match new path
plugins/backstage-plugin-coder-backend/src/module.ts New module implementing backend plugin for new Backstage system with auth policies
plugins/backstage-plugin-coder-backend/src/index.ts Exports new module alongside legacy createRouter for backward compatibility
plugins/backstage-plugin-coder-backend/package.json Adds @backstage/backend-plugin-api dependency for new backend system support
plugins/backstage-plugin-coder-backend/README.md Documents setup instructions for both new and legacy backend systems

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant