fix(auth): bump API host to v2-12-3 and add LIFTOFF_API_BASE override#15
Merged
Conversation
Liftoff retired v2-12-2 with "The server is deprecated", breaking every authenticated subcommand once the cached access token expires. v2-12-3 is currently the only live host (v2-13-0..2 also return deprecated; v2-14+ don't resolve). Bumping the default fixes today's breakage; the new LIFTOFF_API_BASE env var lets users dodge the next retirement without waiting for a release. When the backend returns the deprecation marker (from refresh, login, or any tRPC query), surface an actionable error pointing users at the env-var workaround instead of the bare upstream message.
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
v2-12-2host with"The server is deprecated.", breaking every authenticated subcommand once the cached access token expires. Bumps the compiled-in default tov2-12-3(probed: v2-12-3 is the only live host right now — v2-13-0..2 also return deprecated; v2-14+ don't resolve).LIFTOFF_API_BASEenv-var override so the next deprecation can be worked around without waiting on a release. Logged once to stderr when the override is in effect.auth refresh,auth login, or any authenticated tRPC query — points users at the env-var workaround and notes that the Liftoff iOS/Android app shows its version under Settings → About.Why this design
tokenURL/path stays unchanged — only the host varies between Liftoff versions.~/.config/liftoff-export/auth.jsonsurvives the version bump (verified locally —workouts list --since 7dsucceeded with the previous token against the new default).Test plan
go build ./... && go vet ./...cleanLIFTOFF_API_BASE=https://v2-12-2.api.getgymbros.com liftoff-export auth refresh→ emits override banner, then actionable deprecation error (not bare upstream text)liftoff-export auth refresh(no override, default v2-12-3) → succeedsliftoff-export workouts list --since 7d→ returns real workouts via tRPCFollowup (release)
After merge, cut
v1.0.6so the goreleaser workflow rebuilds the five platform binaries + checksums. Hold for explicit go-ahead before tagging.