Add VK OAuth implicit flow and fix sync issues

- Replace manual community token entry with OAuth button that redirects
  to VK authorization and auto-saves token via /vk/callback
- Fix groups.get API call (was groups.getById) to correctly retrieve
  admin group id and name from user token response
- Fix price comparison: VK price.amount is in roubles, not kopecks
- Keep manual token input as fallback when VK_CLIENT_ID is not set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mguschin
2026-03-10 17:21:16 +03:00
parent 1bf82adbfc
commit fd7d0022ea
4 changed files with 171 additions and 63 deletions

View File

@@ -18,6 +18,8 @@ class Settings(BaseSettings):
VK_DEFAULT_PHOTO_PATH: str = "/app/default_product.png"
VK_CLIENT_ID: str = ""
VK_CLIENT_SECRET: str = ""
VK_API_VERSION: str = "5.131"
# Docker compose vars (ignored in app, kept for env compatibility)