Files
AnabasisChatRemove/deploy/vk-auth-setup.md
Денисов Александр Андреевич 0a82ad7e3e
Some checks are pending
Desktop Release / release (push) Waiting to run
Desktop CI / tests (push) Successful in 1m51s
Add VK callback auth support and admin demotion
2026-06-05 19:01:52 +03:00

1.7 KiB

VK OAuth callback setup

The desktop app uses this redirect URI by default:

https://vk.daemonlord.ru/vk/callback

The public HTTPS endpoint is expected to be handled by a reverse proxy. The backend callback host itself is plain HTTP on a non-standard local port:

http://127.0.0.1:8787/vk/callback

VK app settings

  1. Open the VK developer dashboard.
  2. Select the standalone app with ID 54454043.
  3. Make sure the app type is Standalone application.
  4. Add the exact redirect URI:
https://vk.daemonlord.ru/vk/callback

If the redirect URI in the OAuth request does not exactly match the app settings, VK can return:

{"error":"invalid_request","error_description":"Security Error"}

Backend callback host

Run the local HTTP callback host:

python deploy/vk_callback_server.py --host 127.0.0.1 --port 8787

Health check:

http://127.0.0.1:8787/health

Optional systemd unit:

deploy/systemd/anabasis-vk-callback.service

Adjust WorkingDirectory, ExecStart, and User for the server path/user.

The callback page does not process or store the token. With implicit OAuth, VK puts access_token in the URL fragment. The desktop webview reads that final URL directly from the embedded browser.

Reverse proxy

Use the nginx example:

deploy/nginx/vk.daemonlord.ru.conf

It proxies:

https://vk.daemonlord.ru/vk/callback -> http://127.0.0.1:8787/vk/callback

Desktop app override

The app already defaults to https://vk.daemonlord.ru/vk/callback. To override it:

$env:ANABASIS_VK_REDIRECT_URI = "https://vk.daemonlord.ru/vk/callback"
python main.py