Gmail Google-account OAuth
Version: 3.2.0 Date: 2026-11-17
Goal: Read one Gmail mailbox with a user refresh token, like n8n, without domain-wide delegation.
Solution: Email Gmail sources accept auth: oauth. The wizard opens Google consent (access_type=offline). Tower stores the refresh token in token and mints an access token on each poll.
Features:
- Wizard: IMAP, Google DWD, or Google account. Test connection opens Google consent when there is no refresh token yet.
- Client id/secret from the form, or
GMAIL_OAUTH_CLIENT_ID/GMAIL_OAUTH_CLIENT_SECRET - Redirect
https://<tower>/api/v1/config/gmail/oauth/callback(activation public URL) - Poll uses the refresh token; empty mailbox still refreshes it
Implementation Details:
- No impersonation:
users/meis the consented account. Test connection rejects a mailbox that does not match. - Consent popup posts a one-shot session id; the UI fetches the refresh token with the Tower session.
Files Modified:
src/protocol/source/email/gmail.client.ts- refresh-token accesssrc/protocol/source/email/gmail.oauth.service.ts- start / callback / sessionsrc/protocol/source/email/gmail.oauth.controller.ts- consent routesui/src/pages/workflows/stepForms/StepInitForm.tsx- Google account; Test connection starts consentui/src/protocol/tower.mock.ts- demo sourceGmail inboxand OAuth start/sessiondocs/user/configuration/gmail-dwd.md- domain-wide delegation how-to (EN / FR)docs/user/configuration/gmail-oauth.md- Sign in with Google how-to (EN / FR)
Release fragment: feat-gmail-oauth