Skip to content

feat(clerk-js): support Slack workspace hints during authentication - #10402

Open
tmilewski wants to merge 3 commits into
mainfrom
tom/support-slack-team-parameter
Open

tmilewski wants to merge 3 commits into
mainfrom
tom/support-slack-team-parameter

Conversation

@tmilewski

@tmilewski tmilewski commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Description

Applications that already know a user's Slack workspace cannot pass it through Clerk's OAuth APIs. Add optional slackTeamId to Slack sign-in and sign-up inputs for low-level, redirect, popup, and unified SSO flows.

The SDK serializes the value as slack_team_id. Reused sign-in attempts prepare the current request's hint on the existing attempt, so a new value is validated and a resolved Protect challenge remains bound to that attempt.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • JSDoc comments have been added for the public parameter.
  • Documentation has been updated in the companion docs change.

Type of change

  • New feature

Part of CORE-3802

@changeset-bot

changeset-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 449c40b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@clerk/clerk-js Minor
@clerk/shared Minor
@clerk/chrome-extension Patch
@clerk/electron Patch
@clerk/expo Patch
@clerk/mosaic Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/swingset Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/ui Patch
@clerk/vue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 25, 2026 11:56pm UTC
swingset Ready Ready Preview Oct 25, 2026 11:56pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 84c4780 and 449c40b.

Files selected for processing: 10
  • .changeset/bright-slack-workspaces.md
  • packages/clerk-js/src/core/resources/SignIn.ts
  • packages/clerk-js/src/core/resources/SignUp.ts
  • packages/clerk-js/src/core/resources/__tests__/SignIn.test.ts
  • packages/clerk-js/src/core/resources/__tests__/SignUp.test.ts
  • packages/shared/src/types/redirects.ts
  • packages/shared/src/types/signInCommon.ts
  • packages/shared/src/types/signInFuture.ts
  • packages/shared/src/types/signUpCommon.ts
  • packages/shared/src/types/signUpFuture.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 6 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.

Walkthrough

The change adds optional slackTeamId parameters to shared sign-in and sign-up types. Legacy and future flows forward the hint in authentication requests. Reused sign-ins prepare a first factor when a hint is defined. Tests cover request serialization, redirect and popup flows, retries, and Protect challenges.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • clerk/javascript#9174: Changes popup authentication contracts used by the unified SignIn and SignUp SSO popup flows.

Suggested reviewers: wobsoriano, zourzouvillys

Merge Risk: Minimal · up to 449c4

No confirmed issue currently blocks merging. The reused-sign-in request still warrants normal integration validation.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description directly explains adding optional slackTeamId support to Slack sign-in and sign-up flows, including serialization and reused sign-in behavior.
Title check Passed The title clearly identifies the main change: adding Slack workspace hint support in clerk-js authentication flows.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 9…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 9 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10402

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10402

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10402

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10402

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10402

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10402

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10402

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10402

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10402

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10402

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10402

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10402

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10402

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10402

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10402

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10402

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10402

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10402

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10402

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10402

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10402

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10402

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10402

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10402

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10402

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10402

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10402

commit: 449c40b

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-10-26T16:21:46.541Z

Summary

Metric Count
Packages analyzed 20
Packages with changes 1
🔴 Breaking changes 0
🟡 Non-breaking changes 4
🟢 Additions 3

🤖 This report was reviewed by claude-sonnet-4-6.


@clerk/shared

Current version: 4.41.1
Recommended bump: MINOR → 4.42.0

Subpath ./types

🟡 Non-breaking Changes (4)

Modified: AuthenticateWithRedirectParams
// ... 7 unchanged lines elided ...
    emailAddress?: string;
    legalAccepted?: boolean;
    oidcPrompt?: string;
+   slackTeamId?: string;
    __internal_callbackParams?: HandleOAuthCallbackParams;
    enterpriseConnectionId?: string;
  };

Static analyzer: Breaking change in type alias AuthenticateWithRedirectParams: Type changed: {redirectUrl:string;redirectUrlComplete:string;continueSignUp?:boolean;continueSignIn?:boolean;strategy:import("@clerk/… → {redirectUrl:string;redirectUrlComplete:string;continueSignUp?:boolean;continueSignIn?:boolean;strategy:import("@clerk/…

🤖 AI review (reclassified as non-breaking) (97%): The only change is adding a new optional property slackTeamId? to AuthenticateWithRedirectParams. This type is used exclusively in input/parameter positions (authenticateWithRedirect params). Adding an optional property to an input type does not break existing callers who don't pass it.

Modified: PrepareVerificationParams
// ... 13 unchanged lines elided ...
    actionCompleteRedirectUrl?: string;
    oidcPrompt?: string;
    oidcLoginHint?: string;
+   slackTeamId?: string;
  } | {
    strategy: EnterpriseSSOStrategy;
    redirectUrl?: string;
// ... 2 unchanged lines elided ...

Static analyzer: Breaking change in type alias PrepareVerificationParams: Type changed: {strategy:import("@clerk/shared").EmailCodeStrategy;}|{strategy:import("@clerk/shared").EmailLinkStrategy;redirectUrl?:… → {strategy:import("@clerk/shared").EmailCodeStrategy;}|{strategy:import("@clerk/shared").EmailLinkStrategy;redirectUrl?:…

🤖 AI review (reclassified as non-breaking) (97%): The only change is adding a new optional property slackTeamId? to the OAuthStrategy variant of PrepareVerificationParams. This type is used exclusively as a parameter (input position) to SignUpResource.prepareVerification. Adding an optional property to an input type does not break existing callers.

Modified: SignInCreateParams
// ... 4 unchanged lines elided ...
    identifier?: string;
    oidcPrompt?: string;
    oidcLoginHint?: string;
+   slackTeamId?: string;
  } | {
    strategy: TicketStrategy;
    ticket: string;
// ... 31 unchanged lines elided ...

Static analyzer: Breaking change in type alias SignInCreateParams: Type changed: ({identifier:string;}|{strategy:import("@clerk/shared").AppleIdTokenStrategy;token:string;}|{strategy:import("@clerk/sh… → ({identifier:string;}|{strategy:import("@clerk/shared").AppleIdTokenStrategy;token:string;}|{strategy:import("@clerk/sh…

🤖 AI review (reclassified as non-breaking) (97%): The only change is adding a new optional property slackTeamId? to the OAuthStrategy | EnterpriseSSOStrategy variant of SignInCreateParams. This type is used exclusively as a parameter (input position) to SignInResource.create. Adding an optional property to an input type does not break existing callers.

Modified: SignUpCreateParams
// ... 11 unchanged lines elided ...
    legalAccepted: boolean;
    oidcPrompt: string;
    oidcLoginHint: string;
+   slackTeamId?: string;
    channel: PhoneCodeChannel;
    locale?: string;
    timezone?: string;
// ... 1 unchanged line elided ...

Static analyzer: Breaking change in type alias SignUpCreateParams: Type changed: !Partial:type<{externalAccountStrategy:string;externalAccountRedirectUrl:string;externalAccountActionCompleteRedirectUr… → !Partial:type<{externalAccountStrategy:string;externalAccountRedirectUrl:string;externalAccountActionCompleteRedirectUr…

🤖 AI review (reclassified as non-breaking) (97%): The only change is adding a new optional property slackTeamId? inside the Partial<...> wrapper of SignUpCreateParams. Since the entire object is wrapped in Partial, the resulting property is optional, and this type is used exclusively in input positions (SignUpResource.create, upsert). Adding an optional property to an input type does not break existing callers.

🟢 Additions (3)

Added: SignInFutureCreateParams.slackTeamId
+ slackTeamId?: string;

Added property SignInFutureCreateParams.slackTeamId

Added: SignInFutureSSOParams.slackTeamId
+ slackTeamId?: string;

Added property SignInFutureSSOParams.slackTeamId

Added: SignUpFutureSSOParams.slackTeamId
+ slackTeamId?: string;

Added property SignUpFutureSSOParams.slackTeamId


Report generated by Break Check

Last ran on 449c40b.

This branch was successfully deployed

2 active deployments
Preview – swingset — 449c40b4 Deployed Oct 25, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 449c40b4 Deployed Oct 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant