Skip to content

Use dbNoCache for OAuth identity lookups to avoid Hyperdrive cache staleness#15

Merged
phulin merged 1 commit into
phulin:mainfrom
jhurwitz:fix-oauth-link-persistence
May 15, 2026
Merged

Use dbNoCache for OAuth identity lookups to avoid Hyperdrive cache staleness#15
phulin merged 1 commit into
phulin:mainfrom
jhurwitz:fix-oauth-link-persistence

Conversation

@jhurwitz
Copy link
Copy Markdown
Contributor

Summary

  • OAuth login lookups (WHERE oauth_provider = ? AND oauth_sub = ?) were using the cached Hyperdrive client
  • After linking an account via the username selection flow, the cache could serve the pre-link result on the next OAuth attempt, making it appear the oauth_sub wasn't saved — causing the username prompt to appear again
  • Fix: use dbNoCache for all four OAuth identity lookups (Google web callback, Google GET callback, Apple native, Google native)

🤖 Generated with Claude Code

…aleness

After linking an account, the cached DB client could serve stale results
on the next OAuth login attempt, making it appear the link wasn't saved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@phulin phulin merged commit 4c2527b into phulin:main May 15, 2026
1 check passed
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.

2 participants