fix(connect): clean Google device-code rejection + Trimble unregistered fail-fast (#151, #153)#155
Merged
Merged
Conversation
…unregistered Trimble (#151, #153) - #151: the bundled Google client is a Desktop/loopback client and can't do the device-authorization flow, so `--device-code` hit /device/code and leaked a raw 401. Google now defaults to no device endpoint → the flow reports it unsupported and points at `--oauth` (which works), matching Trimble. A BYO profile that sets a device-capable endpoint still opts in. - #153: `trimble-connect --oauth` sent the literal AWARE_AECO_PLACEHOLDER client_id to Trimble ("Unregistered client"). connect now fails fast when the resolved client_id is still a placeholder, pointing the user at a BYO profile (#146). Adds IntegrationConfig::is_placeholder_client. (Registering a real first-party Trimble app remains a separate follow-up.)
…undled (#151 review) The first cut disabled Google device-code for any config lacking an explicit device endpoint override — including BYO Google clients (env/profile client_id) that may be device-capable. Only the bundled first-party Desktop client can't do device-code; a BYO client now gets an explicit override or Google's standard device endpoint. Gated on IntegrationConfig::is_first_party. Found by Codex.
- Google device-code regression test clears AWARE_OAUTH_GOOGLE_CLIENT_ID/SECRET so a BYO env override can't turn Google device-capable and hit the network. - trimble placeholder unit test guards against AWARE_OAUTH_TRIMBLE_CLIENT_ID resolving a real BYO client. Found by Codex review.
This was referenced May 24, 2026
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
Two connect/auth UX fixes for the bundled first-party apps.
google-workspace --device-codeleaked a raw Google 401 (the bundled Google client is a Desktop/loopback client; device-auth needs a "TV & Limited Input" client). It now reports device-code unsupported and points at--oauth(which works), matching Trimble's clean message. Only the bundled first-party client is gated — a BYO Google client (env/profile, possibly device-capable) still gets Google's standard device endpoint or an explicit profile override.trimble-connect --oauthsent the literalAWARE_AECO_PLACEHOLDER_TRIMBLE_CLIENT_IDto Trimble ("Unregistered client"). connect now fails fast when the resolved client_id is still a placeholder, pointing at a BYO profile (Tier 2: first-class bring-your-own OAuth app registration (per-org) #146). AddsIntegrationConfig::is_placeholder_client/is_first_party.Review
Codex (
codex exec review --base main) — 3 rounds, all findings addressed, final pass clean (over-gating of BYO Google device-code; test env isolation).Test plan
cargo test --bin aware(381) +connect_byointegration tests green; new unit + integration coverage for both paths, env-isolated