feat: implement token encryption and state management for OAuth connectors

- Added encryption for sensitive tokens (access token, refresh token, client secret) in Google Calendar, Google Drive, Gmail, Linear, and Notion connectors to enhance security.
- Introduced OAuthStateManager for secure state parameter generation and validation, improving the integrity of OAuth flows.
- Updated callback routes to handle state validation and error management, ensuring robust handling of authorization processes.
- Enhanced indexers to support decryption of tokens for backward compatibility, maintaining functionality with existing encrypted credentials.
- Improved validation for date parameters in connector routes to ensure proper input handling.
This commit is contained in:
Anish Sarkar 2026-01-02 23:46:03 +05:30
parent ec7599362d
commit 45489423d1
17 changed files with 1140 additions and 152 deletions

View file

@ -514,16 +514,6 @@ def validate_connector_config(
"validators": {},
},
"SLACK_CONNECTOR": {"required": ["SLACK_BOT_TOKEN"], "validators": {}},
"NOTION_CONNECTOR": {
"required": ["access_token"], # OAuth-based only
"optional": [
"workspace_id", # OAuth fields
"workspace_name",
"workspace_icon",
"bot_id",
],
"validators": {},
},
"GITHUB_CONNECTOR": {
"required": ["GITHUB_PAT", "repo_full_names"],
"validators": {