Skip to content

feat: add Google Ads, Tag Manager, Analytics, and Slides as supported OAuth services#427

Open
danahmadi wants to merge 5 commits intolukilabs:mainfrom
danahmadi:feat/google-search-console-oauth
Open

feat: add Google Ads, Tag Manager, Analytics, and Slides as supported OAuth services#427
danahmadi wants to merge 5 commits intolukilabs:mainfrom
danahmadi:feat/google-search-console-oauth

Conversation

@danahmadi
Copy link
Copy Markdown

Summary

  • Adds search-console to the GoogleService type union, GOOGLE_SERVICE_SCOPES mapping, and Zod config validator
  • Enables Google Search Console sources to authenticate via the built-in Google OAuth flow using the webmasters.readonly scope

Currently, setting up a Google Search Console source fails because search-console isn't recognized as a valid googleService value. This is a minimal change (3 files, ~4 lines) that follows the exact same pattern as the existing 5 Google services.

Files changed

File Change
packages/shared/src/sources/types.ts Add 'search-console' to GoogleService type
packages/shared/src/auth/google-oauth.ts Add scope mapping for webmasters.readonly
packages/shared/src/config/validators.ts Add 'search-console' to Zod enum

Test plan

  • Create a Google Search Console source with "googleService": "search-console"
  • Verify config validation passes (previously rejected)
  • Trigger Google OAuth and confirm webmasters.readonly scope is requested
  • Verify token refresh works after initial auth
  • Existing Google service OAuth flows unaffected

🤖 Generated with Claude Code

Add 'search-console' to the GoogleService type, scope mapping, and
config validator so Search Console sources can authenticate via the
built-in Google OAuth flow with webmasters.readonly scope.

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
@danahmadi
Copy link
Copy Markdown
Author

This is my first PR to a public project, ever -- don't hold back

@rjulius23
Copy link
Copy Markdown
Collaborator

Amazing, thanks. Will add. YouTube as well :)

danahmadi and others added 3 commits March 16, 2026 15:41
Per reviewer feedback, adds 'youtube' with youtube.readonly scope
alongside the search-console addition.

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
Match the pattern of other Google services which all use full access.
- search-console: webmasters → webmasters (was webmasters.readonly)
- youtube: youtube → youtube (was youtube.readonly)

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
…vices

Scopes verified against official Google API docs:
- ads: adwords (full Google Ads access)
- tag-manager: manage.accounts + edit.containers + edit.containerversions
  + publish + readonly (comprehensive GTM management)
- analytics: analytics + analytics.readonly (GA4 view and manage)
- slides: presentations (full Slides access)

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
@danahmadi
Copy link
Copy Markdown
Author

Thanks! Added YouTube along with Google Ads, Tag Manager, Analytics (GA4), and Slides in the latest commit.... figured we'd cover the most commonly used Google APIs in one go. All scopes verified against official Google docs.

@rjulius23
Copy link
Copy Markdown
Collaborator

Good point. Adding them together with youtube.

Adopt upstream naming convention (searchconsole instead of search-console)
and readonly scope from main, while keeping ads, tag-manager, analytics,
and slides services from this branch.

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
@danahmadi danahmadi changed the title feat: add Google Search Console as supported Google OAuth service feat: add Google Search Console, Ads, Tag Manager, Analytics, and Slides as supported OAuth services Mar 25, 2026
@danahmadi danahmadi changed the title feat: add Google Search Console, Ads, Tag Manager, Analytics, and Slides as supported OAuth services feat: add Google Ads, Tag Manager, Analytics, and Slides as supported OAuth services Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants