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

geniusrabbit / blaze-api / 35361913195
4%
main: 4%

Build:
Build:
LAST BUILD BRANCH: cursor/fix-oauth-member-scan-panic-99f3
DEFAULT BRANCH: main
Ran 18 Sep 2026 03:26PM UTC
Jobs 1
Files 257
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

18 Sep 2026 03:20PM UTC coverage: 4.061% (+0.1%) from 3.918%
35361913195

Pull #8

github

cursoragent
Fix OAuth token exchange duplicate key error on request_id

During authorization_code grant flow, CreateAccessTokenSession was
INSERTing a new row with the same request_id from the authorize step,
violating the UNIQUE constraint idx_auth_session_uniq_request_id.

Root cause: Fosite reuses the same request.GetID() across the authorize
and token exchange steps, so both CreateAuthorizeCodeSession and
CreateAccessTokenSession were trying to create separate rows with the
same request_id.

Fix: CreateAccessTokenSession now:
1. Looks up the existing session by request_id (from authorize step)
2. Updates it with the new access token signature and session data
3. Only INSERTs if no existing session is found (edge case)

This matches the approach used in CreatePKCERequestSession (PR #6) and
aligns with how fosite manages OAuth sessions - a single session row
evolves through the authorize → token exchange lifecycle.

Added TestAuthorizationCodeToAccessTokenFlow to verify the full flow:
CreateAuthorizeCodeSession → CreateAccessTokenSession correctly updates
the existing session instead of creating a duplicate.

Co-authored-by: Dmitry <demdxx@gmail.com>
Pull Request #8: Fix OAuth token exchange duplicate key error on request_id

39 of 48 new or added lines in 1 file covered. (81.25%)

1116 of 27482 relevant lines covered (4.06%)

0.04 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
42.22
5.91% pkg/auth/oauth2/serverprovider/storage.go
Jobs
ID Job ID Ran Files Coverage
1 Go-1.26.x - 35361913195.1 18 Sep 2026 03:26PM UTC 257
4.06
GitHub Action Run
Source Files on build 35361913195
  • Tree
  • List 257
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #8
  • PR Base - main (#35358080886)
  • Delete
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