• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive-cloud-ui / 22677753356
75%

Build:
DEFAULT BRANCH: main
Ran 04 Mar 2026 04:05PM UTC
Jobs 1
Files 58
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Mar 2026 04:04PM UTC coverage: 72.108% (-4.8%) from 76.909%
22677753356

push

github

web-flow
refactor(auth): rely only on better-auth logic (#382)

* refactor(auth): avoid save accounta data in better-auth

* refactor(auth): remove custom oidc token cookie/crypto/refresh layer

Delete cookie.ts, token.ts, crypto.ts — the custom stateless token
management layer built before Better Auth supported storeAccountCookie.

Better Auth 1.4+ handles all of this natively via storeAccountCookie and
auth.api.getAccessToken(), so the custom layer is no longer needed.

- Remove OidcTokenData and TokenResponse from types.ts (no longer stored
  in custom cookies)
- Remove getOidcProviderAccessToken, getOidcIdToken, saveAccountTokenToCookie,
  databaseHooks, and cookie imports from auth.ts
- Remove getOidcIdToken and saveAccountToken (cookie helpers) from utils.ts
- Reduce proxy.ts to a passthrough (token refresh now handled by Better Auth)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(auth): use auth.api.getAccessToken for token retrieval

Replace the custom getValidOidcToken() and getOidcIdToken() calls with
Better Auth's built-in auth.api.getAccessToken(), which handles token
reading, automatic refresh, and idToken retrieval natively.

- api-client.ts: call auth.api.getAccessToken() instead of getValidOidcToken()
- actions.ts: remove clearOidcTokenAction (Better Auth signOut() clears
  account_data automatically); use auth.api.getAccessToken() to get idToken
  for RP-Initiated Logout
- auth-client.ts: remove clearOidcTokenAction call from signOut()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: update test suite for removed auth token layer

- Delete tests for removed modules: auth-cookie-mode, auth (db token tests),
  token, cookie-proxy, crypto
- Update auth-client.test.ts: remove clearOidcTokenAction mock and assertions
- Update utils.test.ts: remove cookie-based getOidcIdToken / saveAccountToken tests
- Update vitest.setup.ts: add auth.api.getAccessToken global mock returning
  "mock-test-token"; remove @/li... (continued)

196 of 279 branches covered (70.25%)

Branch coverage included in aggregate %.

7 of 7 new or added lines in 2 files covered. (100.0%)

32 existing lines in 2 files now uncovered.

365 of 499 relevant lines covered (73.15%)

12.79 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
6
22.22
-34.36% src/lib/auth/auth.ts
26
35.38
-58.46% src/lib/auth/db.ts
Jobs
ID Job ID Ran Files Coverage
1 22677753356.1 04 Mar 2026 04:05PM UTC 58
72.11
GitHub Action Run
Source Files on build 22677753356
  • Tree
  • List 58
  • Changed 5
  • Source Changed 4
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #22677753356
  • ff5a6303 on github
  • Prev Build on main (#22621326949)
  • Next Build on main (#22724117354)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc