mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 17:05:56 +03:00
[PR #324] [MERGED] Switch OAuth provider reads to PostgreSQL and enable Wix monitoring #289
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#289
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/324
Author: @AJaySi
Created: 2/9/2026
Status: ✅ Merged
Merged: 2/9/2026
Merged by: @AJaySi
Base:
main← Head:codex/update-provider-services-for-postgresql📝 Commits (2)
1e7dd68Move provider token reads to PostgreSQLe66fbebDocument postgres oauth migration and add comments📊 Changes
10 files changed (+1312 additions, -616 deletions)
View changed files
📝
backend/routers/bing_oauth.py(+18 -25)📝
backend/routers/gsc_auth.py(+17 -25)📝
backend/services/gsc_service.py(+275 -105)📝
backend/services/integrations/bing_oauth.py(+313 -148)➕
backend/services/integrations/provider_registry.py(+54 -0)📝
backend/services/integrations/wix_oauth.py(+219 -96)📝
backend/services/integrations/wordpress_oauth.py(+218 -104)📝
backend/services/oauth_token_monitoring_service.py(+44 -81)📝
backend/services/scheduler/executors/oauth_token_monitoring_executor.py(+84 -32)➕
docs/oauth_provider_postgres_migration.md(+70 -0)📄 Description
Motivation
gsc_credentials,bing_oauth_tokens,wordpress_oauth_tokens,wix_oauth_tokens)._check_wix_tokenbehavior with a backend check against stored tokens.Description
ProviderRegistryand switchedget_connected_platformsto use the registry and providerget_user_token_statusAPIs rather than reading SQLite files directly, and preserved dual-write behavior for rollback safety (backend/services/integrations/provider_registry.py,backend/services/oauth_token_monitoring_service.py).GSCService,BingOAuthService,WordPressOAuthService,WixOAuthService) to initialize and read/write PostgreSQL tables (while continuing to write to the existing SQLite tables), and added helper_execute_postgres/table init logic to each service to centralize Postgres access (backend/services/gsc_service.py,backend/services/integrations/bing_oauth.py,backend/services/integrations/wordpress_oauth.py,backend/services/integrations/wix_oauth.py).ProviderRegistryfor platform service instances and replaced the old frontend-only Wix path with a backend token check in_check_wix_token, enabling Wix monitoring and refresh/expiry handling (backend/services/scheduler/executors/oauth_token_monitoring_executor.py).user_idfrom the new Postgres-backed results where appropriate and to create platform insights tasks from the Postgres-backed user id when available (backend/routers/gsc_auth.py,backend/routers/bing_oauth.py).Testing
PLATFORM_DATABASE_URL/USER_DATA_DATABASE_URLare set before deploying to verify table creation and monitoring task flows.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.