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

go-pkgz / auth / 32674835521
86%
master: 86%

Build:
Build:
LAST BUILD BRANCH: feat/partitioned-cookies
DEFAULT BRANCH: master
Ran 23 Aug 2026 11:53PM UTC
Jobs 1
Files 25
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

23 Aug 2026 11:08PM UTC coverage: 86.019% (-0.03%) from 86.05%
32674835521

Pull #318

github

paskal
Address review: scope the claim, clear legacy cookies, warn on missing Secure

The description and the godoc claimed this unblocks a framed
deployment's OAuth. It does not, and for the common case it is worse
than neutral: the partition key is the top-level site at the moment the
cookie is set, an OAuth popup is its own top-level context, so a
callback cookie is keyed to the auth site and the frame never sees it.
Where unpartitioned third-party cookies are still allowed, enabling the
flag turns a working OAuth session into an invisible one. Both godocs
now say so, and point at requestStorageAccess or a one-shot code
exchanged inside the frame as the application-side routes. The feature
is real for direct, telegram and the email-code flow, where Set runs
inside the frame, and that is what it now claims.

Reset also has to clear the unpartitioned pair. A partitioned expiry
does not match a cookie stored before the option was turned on; the
browser then sends both, sorted oldest first, and Request.Cookie returns
the first, so Get reads the legacy one. It is expired but validly
signed, so the refresh path turns it back into a live session. The
/reset subtest now asserts four headers, two of each form.

PartitionedCookies without SecureCookies produces a cookie
http.Cookie.Valid rejects, but SetCookie writes through String and never
calls Valid, so the header goes out, browsers drop both cookies and the
login silently produces no session. Warned at construction rather than
forced, since overriding an explicit SecureCookies: false would be
worse.

And the godoc had SameSite wrong: Valid gates on Secure alone, while
SameSite=None is what makes the cookie get sent from a third-party
frame.

Four byte-count sites were missed in the first pass, in the dev and
custom provider tests in both modules. They assert the generator's
300x300 geometry now, which no Go release moves, rather than an encoded
length. Worth noting CI cannot see this class at all: both workflo... (continued)
Pull Request #318: Add PartitionedCookies so an embedded app can keep an HttpOnly session

40 of 46 new or added lines in 2 files covered. (86.96%)

3230 of 3755 relevant lines covered (86.02%)

9.61 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
96.98
v2/auth.go
Jobs
ID Job ID Ran Files Coverage
1 32674835521.1 23 Aug 2026 11:53PM UTC 25
86.02
GitHub Action Run
Source Files on build 32674835521
  • Tree
  • List 25
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #318
  • PR Base - master (#32226875382)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc