Skip to content

Commit 767d11a

Browse files
mdrokon-devclaude
andcommitted
fix(auth): restore env-var overrides for scope, redirect URI, and response type
Upstream hardcoded these values in 1.0.87+; restore os.environ.get() wrappers so deployments can override without code changes. Default scope keeps ads_management and ads_read on top of upstream's narrowed set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2290dc4 commit 767d11a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎meta_ads_mcp/core/auth.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
# Auth constants
2626
# Scope includes pages_show_list and pages_read_engagement to fix issue #16
2727
# where get_account_pages failed for regular users due to missing page permissions
28-
AUTH_SCOPE = "business_management,public_profile,pages_show_list,pages_read_engagement"
29-
AUTH_REDIRECT_URI = "http://localhost:8888/callback"
30-
AUTH_RESPONSE_TYPE = "token"
28+
AUTH_SCOPE = os.environ.get("META_AUTH_SCOPE", "ads_management,ads_read,business_management,public_profile,pages_show_list,pages_read_engagement")
29+
AUTH_REDIRECT_URI = os.environ.get("META_REDIRECT_URI", "http://localhost:8888/callback")
30+
AUTH_RESPONSE_TYPE = os.environ.get("META_AUTH_RESPONSE_TYPE", "token")
3131

3232
# Log important configuration information
3333
logger.info("Authentication module initialized")

0 commit comments

Comments
 (0)