Repository navigation
Closed as not planned
Labels
Description
Parent
What to build
Add the first PR boundary for Google Search Console: config, team-level OAuth connection storage, safe status/connect/callback/disconnect APIs, audit events, and a basic dashboard integration page route for disconnected, connected, and missing-credential states.
Use TDD with red-green-refactor tracer bullets. Do not implement behavior before a failing behavior test exists.
Acceptance criteria
- Add
HITKEEP_GOOGLE_SEARCH_CONSOLE_CLIENT_ID,HITKEEP_GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET, andHITKEEP_GOOGLE_SEARCH_CONSOLE_REDIRECT_URLconfig fields, with the client secret treated as sensitive. - Default the redirect URL to
${HITKEEP_PUBLIC_URL}/api/integrations/google-search-console/oauth/callbackwhen unset. - Add control-plane storage for team-level connection metadata and token material.
- Add OAuth state validation that binds authenticated user, team, redirect target, and CSRF protection.
- Add status, connect, callback, and disconnect APIs for team-level Google Search Console connection management.
- Request only
https://www.googleapis.com/auth/webmasters.readonly. - Store connection metadata on mocked successful callback and append safe team audit entries for connect success/failure and disconnect.
- Add
/integration/google-search-consoleoutside share mode with disconnected, connected, and missing-credentials states. - Keep
google.golang.org/api/searchconsole/v1behind an internal adapter; generated Google types must not leak outside that adapter. - No token, OAuth code, or client secret appears in API responses, logs, or audit details.
TDD tracer bullets
- RED: self-hosted status reports
credentials_missingwithout echoing configured values. GREEN: config diagnostics only. - RED: connect returns a read-only OAuth URL when credentials are configured. GREEN: OAuth URL builder and endpoint.
- RED: callback rejects missing/invalid state. GREEN: state validation.
- RED: callback stores team connection metadata and appends a safe audit entry. GREEN: callback persistence.
- RED: disconnect removes or inactivates token material and appends audit. GREEN: disconnect flow.
- RED: integration page renders disconnected, connected, and missing-credentials states. GREEN: Angular service/page shell.
Blocked by
None - can start immediately.
Activity
PascaleBeier commentedon May 5, 2026
Closing this implementation-slice issue because we are keeping the Google Search Console breakdown local in docs/triage/139-implementation-plan.md instead of tracking these slices as separate GitHub issues.