Skip to content

feat: add AuthProviderBlock layout block support - #1985

Merged
WilliamBergamin merged 2 commits into
mainfrom
feat-auth-provider-block
Oct 16, 2026
Merged

WilliamBergamin merged 2 commits into
mainfrom
feat-auth-provider-block

Conversation

@WilliamBergamin

@WilliamBergamin WilliamBergamin commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This pull request adds the auth_provider layout block as AuthProviderBlock, matching slackapi/java-slack-sdk#1659 and slackapi/node-slack-sdk#2778.

  • Block.parse returns an AuthProviderBlock instead of skipping it as an unknown block.

Testing

With an app that has features.user_connections and the Home tab enabled:

from slack_sdk.models.blocks import AuthProviderBlock
from slack_sdk.models.views import View

client.views_publish(
    user_id=user_id,
    view=View(
        type="home",
        blocks=[
            AuthProviderBlock(
                value="my-provider",
                name="My Provider",
                is_connected=False,
                auth_url="https://example.com/oauth/start",
            )
        ],
    ),
)
  1. Open the app's Home tab and confirm the provider renders with a Connect button.
  2. Publish again with is_connected=True, a connected_identity, and an overflow accessory; confirm the connected state and menu render.

Ran these steps with a Bolt app on a sandbox. Each views_publish response's blocks parse back to AuthProviderBlock, including Slack's added context block in fallback.

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

🤖 Generated with Claude Code

Models the auth_provider block from the standardized app authentication
docs, matching slackapi/java-slack-sdk#1659 and slackapi/node-slack-sdk#2778.
Block.parse now returns an AuthProviderBlock instead of skipping it.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.35%. Comparing base (8fe5157) to head (0d90636).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1985      +/-   ##
==========================================
+ Coverage   84.25%   84.35%   +0.10%     
==========================================
  Files         118      118              
  Lines       13730    13793      +63     
==========================================
+ Hits        11568    11635      +67     
+ Misses       2162     2158       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

…locks

Puts each max-length note on its own line, as the other text-object
fields do, and adds the section divider the block test classes use.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@WilliamBergamin
WilliamBergamin marked this pull request as ready for review October 15, 2026 20:30
@WilliamBergamin
WilliamBergamin requested a review from a team as a code owner October 15, 2026 20:30

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🧠 🔏 @WilliamBergamin Most exciting a feature

@WilliamBergamin
WilliamBergamin merged commit 699e1d1 into main Oct 16, 2026
18 checks passed
@WilliamBergamin
WilliamBergamin deleted the feat-auth-provider-block branch October 16, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants