Skip to content

fix: subsequent login mixing current profile#46

Merged
leonkenneth merged 2 commits into
mainfrom
fix-subsequent-login-mixing-current-profile
Jul 10, 2026
Merged

fix: subsequent login mixing current profile#46
leonkenneth merged 2 commits into
mainfrom
fix-subsequent-login-mixing-current-profile

Conversation

@leonkenneth

Copy link
Copy Markdown
Contributor

was reusing the previous profile oauth token for post-login whoami when a previous profile existed

made profileName mandatory for all lower-level functions to avoid implicitness

removed auth cache and always resolve from configuration to avoid discrepancies

still left: forbid profile commands when env-vars are set

@albert20260301

Copy link
Copy Markdown
Contributor

The failing Test CLI job is from profile endpoint overrides being cleared by writing empty keys. That leaves api_base= / management_api_base= ahead of later profile values, so config lookup keeps resolving the empty value.

I opened #47 against this branch with the narrow fix. Verification on the stacked branch:

  • bun test tests/configure.test.ts tests/management.test.ts
  • bun test "$PWD"/tests/*.test.ts

@albert20260301

Copy link
Copy Markdown
Contributor

#47 was closed unmerged, and this PR still has the same failing Test CLI job on commit 8136a7a.

The narrow fix is still available at b8df39e (fix: clear profile endpoint overrides). Please cherry-pick that commit into this branch or reopen #47 so the required test can go green.

## Summary
- remove stored profile endpoint override keys instead of rewriting them
as empty values
- keep later stored endpoint values visible to config lookup, including
tests that append profile config entries

## Verification
- `bun test tests/configure.test.ts tests/management.test.ts`
- `bun test "$PWD"/tests/*.test.ts`

Stacked on #46 to repair the failing `Test CLI` job.
@leonkenneth leonkenneth enabled auto-merge (squash) July 10, 2026 12:34
@leonkenneth leonkenneth merged commit 992aaee into main Jul 10, 2026
8 checks passed
@leonkenneth leonkenneth deleted the fix-subsequent-login-mixing-current-profile branch July 10, 2026 12:35
leonkenneth pushed a commit that referenced this pull request Jul 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](v1.0.0...v1.1.0)
(2026-07-10)


### Features

* allow to attach all available catalogs
([#44](#44))
([d3b42c2](d3b42c2))


### Bug Fixes

* harden profile reuse and uniformize profile display and reuse
([#45](#45))
([23ca8f1](23ca8f1))
* **release:** narrow release workflow to published tags
([#40](#40))
([f224328](f224328))
* subsequent login mixing current profile
([#46](#46))
([992aaee](992aaee))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants