Skip to content

feat: Gmail OAuth - Connect with Google for individual org accounts#337

Open
benzntech wants to merge 2 commits intoLogicLabs-OU:mainfrom
benzntech:feature/gmail-oauth-connect
Open

feat: Gmail OAuth - Connect with Google for individual org accounts#337
benzntech wants to merge 2 commits intoLogicLabs-OU:mainfrom
benzntech:feature/gmail-oauth-connect

Conversation

@benzntech
Copy link

Summary

  • Adds google_oauth as a new ingestion provider type for individual Gmail organizational accounts
  • Introduces GoogleOAuthCredentials type (email, accessToken, refreshToken) alongside the existing google_workspace service-account provider — no breaking changes
  • Includes full RapidSpec proposal, tasks, investigation, research, and spec delta in rapidspec/changes/gmail-oauth-connect/

Problem

Connecting a Gmail account currently requires pasting a raw Google Service Account JSON blob + an admin email — a highly technical process that breaks the UX expectations of modern users.

Solution

A new google_oauth provider that lets individual users click "Connect with Google", complete a standard OAuth consent flow, and have their mailbox added automatically. No manual credential fields.

OAuth Flow

User clicks "Connect with Google"
  → GET /api/v1/oauth/google/authorize (authenticated)
  → Redirect to Google consent screen (gmail.readonly + userinfo.email)
  → GET /api/v1/oauth/google/callback
  → Exchange code → store tokens → create IngestionSource
  → Redirect to /dashboard/ingestions

What's in this PR

  • packages/types/src/ingestion.types.tsGoogleOAuthCredentials interface + google_oauth in provider union
  • rapidspec/changes/gmail-oauth-connect/ — full proposal spec (implementation continues in follow-up PRs)

Test plan

  • pnpm build passes with updated types
  • Remaining implementation tasks tracked in rapidspec/changes/gmail-oauth-connect/tasks.md

@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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.

1 participant