aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/typings
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-05-02 00:18:53 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-05-02 00:18:53 -0500
commit44515159af50756ff26a4996ca1526f7e51e9e98 (patch)
tree8e7c012235bf9456011f13f24bf5bde9222fbe51 /libs/plugin_python/typings
parent73fc2ae731a4ef972c16efb31a30da9e9a8645c6 (diff)
nxmaccessmanager: derive legacy API key from OAuth session
Some plugins (Plugin Browser for MO2 and a number of older Python plugins) read only the legacy `apiKey` field. The OAuth login flow populates `accessToken` but never the legacy key, so those plugins fail with "User API Key is missing" even after a successful sign-in. Nexus' v1 `/users/validate.json` endpoint accepts the OAuth bearer token and returns the user's personal API key in the `key` field. We hit it once after `notifyTokens()` (fresh login) and once via the constructor queued call (already-logged-in users on first launch with this build), then persist the result through `GlobalSettings::setNexusApiKey()`. The fetch is a no-op when an apiKey is already present (manual entry or prior session) so it never overwrites a user-set value, and silently fails on non-200 / missing field so we don't break the OAuth-only path when Nexus eventually deprecates personal API keys. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/plugin_python/typings')
0 files changed, 0 insertions, 0 deletions