mirror of
https://github.com/langgenius/dify.git
synced 2026-05-21 01:07:03 +08:00
Canonical class OAuthDeviceCodeApi now lives in controllers/openapi/oauth_device/code.py and is registered on openapi_ns at /openapi/v1/oauth/device/code. service_api/oauth.py re-registers the same class object on service_api_ns at /v1/oauth/device/code so existing callers keep working until Phase F. KNOWN_CLIENT_IDS literal moves to dify_config.OPENAPI_KNOWN_CLIENT_IDS (CSV-parsed, default "difyctl") so new CLIs / SDKs can be admitted without code changes (CLAUDE.md rule 8 — no magic strings). _verification_uri helper moves with the handler. Single source of truth — no duplicated logic between the two mounts. Plan: docs/superpowers/plans/2026-04-26-openapi-migration.md (in difyctl repo).