1.7 KiB
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
- Open the VK developer dashboard.
- Select the standalone app with ID
54454043. - Make sure the app type is
Standalone application. - 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