nordabiz/blueprints/api/__init__.py
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

22 lines
711 B
Python

"""
API Blueprint
==============
Public API routes for analytics tracking and other frontend interactions.
"""
from flask import Blueprint
bp = Blueprint('api', __name__, url_prefix='/api')
from . import routes_analytics # noqa: E402, F401
from . import routes_recommendations # noqa: E402, F401
from . import routes_contacts # noqa: E402, F401
from . import routes_seo_audit # noqa: E402, F401
from . import routes_gbp_audit # noqa: E402, F401
from . import routes_social_audit # noqa: E402, F401
from . import routes_company # noqa: E402, F401
from . import routes_membership # noqa: E402, F401
from . import routes_audit_actions # noqa: E402, F401
from . import routes_oauth # noqa: E402, F401