NeerajCodz commited on
Commit
b52ebe6
·
verified ·
1 Parent(s): 1426b67
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -13,6 +13,7 @@ from uvicorn import run as uvicorn_run
13
  # Slack Libraries (Async versions)
14
  from slack_bolt.async_app import AsyncApp
15
  from slack_bolt.adapter.fastapi.async_handler import AsyncSlackRequestHandler
 
16
  from slack_sdk.oauth.installation_store.async_installation_store import AsyncInstallationStore
17
  from slack_sdk.oauth import AuthorizeUrlGenerator
18
  from slack_sdk.oauth.installation_store.models import Installation
@@ -121,10 +122,14 @@ installation_store = SupabaseAsyncInstallationStore(supabase)
121
 
122
  # Initialize Bolt Async App
123
  app = AsyncApp(
124
- client_id=SLACK_CLIENT_ID,
125
- client_secret=SLACK_CLIENT_SECRET,
126
  signing_secret=SLACK_SIGNING_SECRET,
127
  installation_store=installation_store,
 
 
 
 
 
 
128
  # Removed token for multi-workspace support; add back if single-workspace only
129
  )
130
 
 
13
  # Slack Libraries (Async versions)
14
  from slack_bolt.async_app import AsyncApp
15
  from slack_bolt.adapter.fastapi.async_handler import AsyncSlackRequestHandler
16
+ from slack_bolt.oauth.async_oauth_settings import AsyncOAuthSettings
17
  from slack_sdk.oauth.installation_store.async_installation_store import AsyncInstallationStore
18
  from slack_sdk.oauth import AuthorizeUrlGenerator
19
  from slack_sdk.oauth.installation_store.models import Installation
 
122
 
123
  # Initialize Bolt Async App
124
  app = AsyncApp(
 
 
125
  signing_secret=SLACK_SIGNING_SECRET,
126
  installation_store=installation_store,
127
+ oauth_settings=AsyncOAuthSettings(
128
+ client_id=SLACK_CLIENT_ID,
129
+ client_secret=SLACK_CLIENT_SECRET,
130
+ scopes=["app_mentions:read", "files:read", "chat:write", "im:read", "im:write", "channels:read"],
131
+ redirect_uri_path="/slack/oauth/callback",
132
+ ),
133
  # Removed token for multi-workspace support; add back if single-workspace only
134
  )
135