Skip to content

Fix oauth, again - #280

Merged
sfreeman422 merged 1 commit into
masterfrom
fix/oauth-again
Sep 8, 2026
Merged

Fix oauth, again#280
sfreeman422 merged 1 commit into
masterfrom
fix/oauth-again

Conversation

@sfreeman422

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings September 8, 2026 19:26
@sfreeman422
sfreeman422 merged commit 31efc34 into master Sep 8, 2026
11 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new workspace restriction relies on a confusingly named env var (ALLOWED_TEAM_DOMAIN holding a team ID), which needs clearer naming/clarification to avoid real-world misconfiguration.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the Slack OpenID Connect login flow to constrain authentication to a specific Slack workspace and aligns setup documentation accordingly, reducing OAuth misconfiguration and unauthorized-workspace attempts.

Changes:

  • Adds a team parameter to the Slack OpenID Connect authorize redirect and requires the allowlisted workspace identifier to be configured.
  • Expands controller tests to assert the new query parameter and configuration error path.
  • Updates README Slack app configuration guidance and backend env var guidance.
File summaries
File Description
README.md Updates Slack OAuth configuration instructions and the expected env var value description.
packages/backend/src/auth/auth.controller.ts Adds workspace restriction (team param) and requires allowlist env var for /slack initiation.
packages/backend/src/auth/auth.controller.spec.ts Adds assertions and a new test case covering missing allowlist env var.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md

# Search & Auth
ALLOWED_TEAM_DOMAIN=your-workspace-domain
ALLOWED_TEAM_DOMAIN=your-slack-team-id
Comment on lines 40 to 45
const clientId = process.env.SLACK_CLIENT_ID;
const redirectUri = process.env.SLACK_REDIRECT_URI;
const teamId = process.env.ALLOWED_TEAM_DOMAIN;

if (!clientId || !redirectUri) {
if (!clientId || !redirectUri || !teamId) {
res.status(500).send('Slack OAuth is not configured');
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.

2 participants