Skip to content

feat: Google OAuth 2.0 integration (Phase 1)#639

Merged
ShaerWare merged 2 commits intomainfrom
feat/google-oauth
Mar 25, 2026
Merged

feat: Google OAuth 2.0 integration (Phase 1)#639
ShaerWare merged 2 commits intomainfrom
feat/google-oauth

Conversation

@ShaerWare
Copy link
Owner

Summary

  • New modules/google/ module — OAuth flow, per-user token storage, auto-refresh
  • DB table google_oauth_tokens + Alembic migration
  • Backend: /admin/google/auth-url, /status, /disconnect, /admin/oauth/google/callback
  • Frontend: "Connect Google" button in Settings (Profile tab) with Google branding
  • Scopes: Drive (ro), Docs (ro), Sheets (ro), Gmail (read + send)
  • CSRF via signed JWT state, 5-min token refresh buffer
  • i18n ru/en/kk

NEWS

🔗 Google подключён к AI Секретарю!

Теперь можно подключить свой Google аккаунт в настройках.
Это первый шаг к работе с Google Диском, Документами, Таблицами
и Gmail прямо из чата. Подключение — одна кнопка в настройках профиля.

Test plan

  • Settings → Profile → click "Connect Google" → redirects to Google consent
  • After consent → redirects back to Settings, shows "Connected as email@gmail.com"
  • Disconnect button revokes token
  • Status endpoint returns correct scopes

🤖 Generated with Claude Code

ShaerWare and others added 2 commits March 23, 2026 23:58
- New module `modules/google/` with OAuth flow, token storage, refresh
- DB table `google_oauth_tokens` (per-user, access + refresh tokens)
- Endpoints: /admin/google/auth-url, status, disconnect
- OAuth callback: /admin/oauth/google/callback → redirects to SPA
- Frontend: "Connect Google" button in Settings with Google branding
- Scopes: Drive, Docs, Sheets, Gmail (readonly + send)
- CSRF protection via signed JWT state parameter
- Auto token refresh with 5-min buffer
- i18n for ru/en/kk

## NEWS

🔗 **Google подключён к AI Секретарю!**

Теперь можно подключить свой Google аккаунт в настройках.
Это первый шаг к работе с Google Диском, Документами, Таблицами
и Gmail прямо из чата. Подключение — одна кнопка в настройках профиля.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…le tab)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ShaerWare ShaerWare merged commit 57e8646 into main Mar 25, 2026
3 checks passed
@ShaerWare ShaerWare deleted the feat/google-oauth branch March 25, 2026 14:47
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