feat: complete local self-hosted auth on the Unity plugin (none/oauth/token)#895
Merged
Conversation
…/token) Finish the local-launch half of the mcp-authorize auth migration so the in-editor AI Game Developer window's authorization no longer crashes the local gamedev-mcp-server on boot with the retired "required" value (the strategy deleted in McpPlugin b5). - Pin McpPlugin 7.0.0 -> 7.1.0 (DependencyResolver NuGetConfig requested pin; the resolver installs the official 7.1.0 DLLs across the plugin + all 5 Unity-Tests projects) and bump local ServerVersion 9.0.0 -> 9.1.0 (+ CLI mirror + test). - Consolidation (owner directive, no duplication): McpServerManager.BuildArguments now delegates to the shared McpPlugin ServerLaunchArguments builder. - 3-way auth UI none/oauth/token; the token field + Generate-Token button appear only in token mode. Wire each mode: none => auth=none; oauth => auth=oauth + auth-issuer + public-url (sourced from the same PinnedHttpUrl the Configure button writes); token => auth=token + token=<local-secret>. - Migrate persisted AuthOption.required -> token on load; scrub legacy authorization=required/token from the plugin-local config writers. - Configure button writes the matching client config per mode (none/oauth URL-only, token URL + Authorization: Bearer via the shared configurator). Local gate: EditMode 0 failures, PlayMode 1/1, CLI 504 passed. Closes #894
Fix two stale XML <code> doc-blocks in McpServerManager.cs that survived the g5/g6 auth scrub and now contradicted the code: - RawJsonConfigurationStdio: drop the ", token=... if auth required" arg from the example (stdio always spawns in none mode; no token arg is ever emitted). - RawJsonConfigurationHttp: drop the conditional "headers"/"Authorization: Bearer" block (config is URL-only now; the offline-token Bearer is written by the shared configurator's HttpCredentialMode.AccessToken path, never baked in here). Comment-only change (no executable code touched). Verified: assets-refresh recompiled the worktree Editor clean (IsCompiling:false, no compile errors). /simplify found nothing to change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gamedev-mcp-serverboot crash on the retiredauthorization=requiredauth mode (deleted in McpPlugin b5) by completing the local-launch half of the mcp-authorize auth migration.NuGetConfigrequested pin; the resolver installs the official 7.1.0 DLLs across the plugin + all 5 Unity-Tests projects) and bumps localServerVersion9.0.0 → 9.1.0 (+ thecli/mirror + test).McpServerManager.BuildArgumentsnow delegates to the shared McpPluginServerLaunchArgumentsbuilder; the Unity-private arg logic is deleted.none/oauth/token(token field + Generate-Token button only in token mode); each mode wired via the shared builder (none →auth=none; oauth →auth=oauth+auth-issuer+public-urlsourced from the samePinnedHttpUrlthe Configure button writes; token →auth=token+token=<local-secret>).AuthOption.required→tokenon load; scrubs legacyauthorization=required/token=from the plugin-local config writers; the Configure button writes the matching client config per mode (none/oauth URL-only, token URL +Authorization: Bearer).Test plan
AuthOptionMigrationTests, theMainWindowEditorStatusLogicTestsauth-segment mapping, theAiAgentConfiguratorViewLogicTestscredential-mode cases, andServerVersionDecouplingTests. (One pre-existing, diff-unrelated fixture,TestsRunDirtySceneTests, is un-runnable via thetests-runMCP tool because its SetUp dirties the scene; validated by CI's native game-ci runner.)cli/): 504 passed / 0 failed (incl. theDEFAULT_SERVER_VERSION↔ C#ServerVersiondrift guard).Closes #894