nordabiz/blueprints/api
Maciej Pienczyn 66cd223568
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
feat(oauth): Phase 3 foundation - OAuth 2.0 framework for external APIs
New files:
- oauth_service.py: Shared OAuth 2.0 service supporting Google and Meta
  providers with token exchange, refresh, and storage
- database/migrations/058_oauth_tokens.sql: oauth_tokens table with
  company/provider/service unique constraint
- blueprints/api/routes_oauth.py: OAuth API endpoints for connect,
  callback, status, and disconnect flows

Supports:
- Google OAuth (GBP Business Profile, Search Console)
- Meta OAuth (Facebook Pages, Instagram)
- CSRF state validation, token refresh, expiry tracking
- Per-company token storage with active/inactive status

Requires .env config:
- GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET (Google APIs)
- META_APP_ID, META_APP_SECRET (Facebook/Instagram)
- OAUTH_REDIRECT_BASE_URL (default: https://nordabiznes.pl)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 11:46:42 +01:00
..
__init__.py feat(oauth): Phase 3 foundation - OAuth 2.0 framework for external APIs 2026-02-08 11:46:42 +01:00
CLAUDE.md fix: Rename pkd_codes column to ceidg_pkd_list to avoid backref conflict 2026-02-01 07:22:32 +01:00
routes_analytics.py refactor: Migrate analytics API routes to api blueprint 2026-01-31 17:35:08 +01:00
routes_audit_actions.py fix(audit): Pass previous analysis data through API response 2026-02-07 18:09:06 +01:00
routes_company.py feat(company): Add registry data enrichment button for admins 2026-02-06 17:54:56 +01:00
routes_contacts.py refactor: Migrate contacts API routes to api blueprint 2026-01-31 17:42:18 +01:00
routes_gbp_audit.py fix(gbp-audit): Fix GBPAuditResult import name mismatch 2026-02-06 18:15:43 +01:00
routes_membership.py feat: Add Biała Lista VAT integration for NIP→KRS lookup 2026-02-01 14:32:36 +01:00
routes_oauth.py feat(oauth): Phase 3 foundation - OAuth 2.0 framework for external APIs 2026-02-08 11:46:42 +01:00
routes_recommendations.py refactor: Migrate access control from is_admin to role-based system 2026-02-01 21:05:22 +01:00
routes_seo_audit.py fix(seo-audit): Fix SEOAuditor import path after migration to scripts/ 2026-02-06 18:12:14 +01:00
routes_social_audit.py refactor: Migrate access control from is_admin to role-based system 2026-02-01 21:05:22 +01:00