Slack team option not implemented but mentioned in docs #1626

Closed
opened 2026-03-13 08:52:12 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @msonnb on GitHub (Aug 2, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Add slack social provider
  2. Add team configuration option
  3. Get TS error Object literal may only specify known properties, and 'team' does not exist in type 'Prettify<SlackOptions & { enabled?: boolean | undefined; }>'

Current vs. Expected behavior

The docs mention this team option under Workspace-Specific Sign In, but looking at the provider code, this option is not implemented

What version of Better Auth are you using?

1.3.4

Provide environment information

n/a

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)


Additional context

No response

Originally created by @msonnb on GitHub (Aug 2, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Add slack social provider 2. Add `team` configuration option 3. Get TS error `Object literal may only specify known properties, and 'team' does not exist in type 'Prettify<SlackOptions & { enabled?: boolean | undefined; }>'` ### Current vs. Expected behavior The docs mention this team option under [Workspace-Specific Sign In](https://www.better-auth.com/docs/authentication/slack#workspace-specific-sign-in), but looking at the provider code, this option is not implemented ### What version of Better Auth are you using? 1.3.4 ### Provide environment information ```bash n/a ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
GiteaMirror added the social-provider label 2026-03-13 08:52:12 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 2, 2025):

Hi @msonnb! I'm Dosu and I’m helping the better-auth team.

The team option for the Slack provider is mentioned in the documentation but is not actually implemented in the codebase, which is why you see a TypeScript error when trying to use it. The Slack provider's type definitions and logic do not include any support for a team property or workspace-specific sign-in restriction, so the docs are currently inaccurate on this point [source] [source].

There are no official workarounds or extensibility points documented for restricting Slack sign-in to a specific workspace, and there are no roadmap items or issues indicating this feature is planned [source].

If you need to enforce workspace restrictions, you could implement a custom check after authentication by inspecting the user's Slack team ID in the returned profile and rejecting sign-ins from unauthorized workspaces in your own logic. But as of now, this isn't handled by the provider itself.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 2, 2025): <!-- Greeting --> Hi @msonnb! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> The `team` option for the Slack provider is mentioned in the documentation but is not actually implemented in the codebase, which is why you see a TypeScript error when trying to use it. The Slack provider's type definitions and logic do not include any support for a `team` property or workspace-specific sign-in restriction, so the docs are currently inaccurate on this point [[source]](https://github.com/better-auth/better-auth/blob/fbdf2b3a18ab3edfc9fcde5ee299acf3ad96048d/packages/better-auth/src/social-providers/slack.ts) [[source]](https://github.com/better-auth/better-auth/blob/fbdf2b3a18ab3edfc9fcde5ee299acf3ad96048d/docs/content/docs/authentication/slack.mdx). There are no official workarounds or extensibility points documented for restricting Slack sign-in to a specific workspace, and there are no roadmap items or issues indicating this feature is planned [[source]](https://github.com/better-auth/better-auth/pull/3460). If you need to enforce workspace restrictions, you could implement a custom check after authentication by inspecting the user's Slack team ID in the returned profile and rejecting sign-ins from unauthorized workspaces in your own logic. But as of now, this isn't handled by the provider itself. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/acfa0493-48f4-43c9-9216-ed5f1e042e88?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/acfa0493-48f4-43c9-9216-ed5f1e042e88?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/acfa0493-48f4-43c9-9216-ed5f1e042e88?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/acfa0493-48f4-43c9-9216-ed5f1e042e88?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/acfa0493-48f4-43c9-9216-ed5f1e042e88?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/acfa0493-48f4-43c9-9216-ed5f1e042e88?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/acfa0493-48f4-43c9-9216-ed5f1e042e88?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/3752)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1626