feat: refactor Todoist integration to single app with OAuth
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 32s

- Single webhook URL for all users

- OAuth authorization flow

- Removed individual webhook tokens

- User identification by todoist_user_id

- Added OAuth endpoints: connect, callback, status, disconnect

- Updated frontend with OAuth flow

- DB migration 013: removed webhook_token, added todoist_user_id, todoist_email, access_token

Version: 2.2.0
This commit is contained in:
Play Life Bot
2026-01-02 15:34:01 +03:00
parent 8ba7e8fd45
commit a7128703fe
6 changed files with 1354 additions and 133 deletions

View File

@@ -42,11 +42,24 @@ TELEGRAM_BOT_TOKEN=your-bot-token-here
WEBHOOK_BASE_URL=https://your-domain.com
# ============================================
# Todoist Webhook Configuration (optional)
# Todoist Integration Configuration
# ============================================
# Секрет для проверки подлинности webhook от Todoist
# Если задан, все запросы должны содержать заголовок X-Todoist-Webhook-Secret с этим значением
# Оставьте пустым, если не хотите использовать проверку секрета
# Единое Todoist приложение для всех пользователей Play Life
# Настроить в: https://developer.todoist.com/appconsole.html
#
# В настройках Todoist приложения указать:
# - OAuth Redirect URL: <WEBHOOK_BASE_URL>/api/integrations/todoist/oauth/callback
# - Webhooks callback URL: <WEBHOOK_BASE_URL>/webhook/todoist
# - Watched events: item:completed
# Client ID единого Todoist приложения
TODOIST_CLIENT_ID=
# Client Secret единого Todoist приложения
TODOIST_CLIENT_SECRET=
# Секрет для проверки подлинности webhook от Todoist (опционально)
# Получить в Developer Console: "Client secret for webhooks"
TODOIST_WEBHOOK_SECRET=
# ============================================