[PR #8324] [MERGED] fix: cherry-pick bug fixes for v1.5.2 #7901

Closed
opened 2026-03-13 13:52:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8324
Author: @himself65
Created: 3/3/2026
Status: Merged
Merged: 3/3/2026
Merged by: @himself65

Base: mainHead: v1.5.2-staging


📝 Commits (7)

  • 0176bd9 fix(sso): prefer UserInfo endpoint over ID token and map sub claim correctly (#8276)
  • cdaff24 fix(oauth-provider): allow localhost subdomains in isLocalhost function (#8286)
  • bcde618 fix(cookies): use lookahead heuristic for splitting Set-Cookie headers (#8301)
  • 8c40d2a fix: access control indexing type (#8155)
  • df5148b fix: prevent double encoded cookie (#8133)
  • c397ae5 fix(prisma-adapter): use deleteMany when deleting by non-unique field (#8314)
  • fa8d5d0 fix(oauth-provider): customIdTokenClaims should override standard claims (#7865)

📊 Changes

19 files changed (+483 additions, -75 deletions)

View changed files

📝 e2e/adapter/test/adapter-factory/basic.ts (+21 -1)
📝 packages/better-auth/src/cookies/cookie-utils.ts (+33 -26)
📝 packages/better-auth/src/cookies/cookies.test.ts (+51 -0)
📝 packages/better-auth/src/integrations/next-js.ts (+1 -1)
📝 packages/better-auth/src/integrations/svelte-kit.ts (+1 -1)
📝 packages/better-auth/src/integrations/tanstack-start-solid.ts (+1 -1)
📝 packages/better-auth/src/integrations/tanstack-start.ts (+1 -1)
📝 packages/better-auth/src/plugins/access/types.ts (+2 -0)
📝 packages/better-auth/src/plugins/admin/client.ts (+2 -2)
📝 packages/better-auth/src/plugins/admin/routes.ts (+2 -2)
📝 packages/better-auth/src/plugins/custom-session/custom-session.test.ts (+32 -0)
📝 packages/better-auth/src/plugins/organization/client.ts (+2 -2)
📝 packages/better-auth/src/plugins/organization/organization.ts (+2 -2)
📝 packages/oauth-provider/src/token.test.ts (+137 -0)
📝 packages/oauth-provider/src/token.ts (+1 -1)
📝 packages/oauth-provider/src/types/zod.ts (+4 -1)
📝 packages/prisma-adapter/src/prisma-adapter.ts (+14 -0)
📝 packages/sso/src/oidc.test.ts (+133 -3)
📝 packages/sso/src/routes/sso.ts (+43 -31)

📄 Description

Summary

Cherry-pick bug fixes from canary for v1.5.2 stable release:

  • fix(sso): prefer UserInfo endpoint over ID token and map sub claim correctly (#8276)
  • fix(oauth-provider): allow localhost subdomains in isLocalhost function (#8286)
  • fix(cookies): use lookahead heuristic for splitting Set-Cookie headers (#8301)
  • fix: access control indexing type (#8155)
  • fix: prevent double encoded cookie (#8133)
  • fix(prisma-adapter): use deleteMany when deleting by non-unique field (#8314)
  • fix(oauth-provider): customIdTokenClaims should override standard claims (#7865)

1 commit skipped (drizzle-adapter date transformation #8289 — already in main).

Test plan

  • pnpm lint — passed
  • pnpm typecheck — no new errors introduced
  • Cookie tests (68/68 passed)
  • Organization/access control tests (174/174 passed)
  • SSO tests — passed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8324 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/3/2026 **Status:** ✅ Merged **Merged:** 3/3/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `main` ← **Head:** `v1.5.2-staging` --- ### 📝 Commits (7) - [`0176bd9`](https://github.com/better-auth/better-auth/commit/0176bd94df2d4943ef5897879cca45e97e3d9f45) fix(sso): prefer UserInfo endpoint over ID token and map sub claim correctly (#8276) - [`cdaff24`](https://github.com/better-auth/better-auth/commit/cdaff242e9c4d1f74a9530c9fe3bbedb8dd72ce5) fix(oauth-provider): allow localhost subdomains in isLocalhost function (#8286) - [`bcde618`](https://github.com/better-auth/better-auth/commit/bcde6188895404ac661bf63d9cb40da1757aed69) fix(cookies): use lookahead heuristic for splitting Set-Cookie headers (#8301) - [`8c40d2a`](https://github.com/better-auth/better-auth/commit/8c40d2aaefc507c3e0293f90418f878d8f8f9368) fix: access control indexing type (#8155) - [`df5148b`](https://github.com/better-auth/better-auth/commit/df5148b330ed8bae76c92ba5faec737a9868ea6b) fix: prevent double encoded cookie (#8133) - [`c397ae5`](https://github.com/better-auth/better-auth/commit/c397ae549a1683a49bcfa200619fd35bc9609cf8) fix(prisma-adapter): use deleteMany when deleting by non-unique field (#8314) - [`fa8d5d0`](https://github.com/better-auth/better-auth/commit/fa8d5d01a569127dfe2cd62c72e513c51027da72) fix(oauth-provider): customIdTokenClaims should override standard claims (#7865) ### 📊 Changes **19 files changed** (+483 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `e2e/adapter/test/adapter-factory/basic.ts` (+21 -1) 📝 `packages/better-auth/src/cookies/cookie-utils.ts` (+33 -26) 📝 `packages/better-auth/src/cookies/cookies.test.ts` (+51 -0) 📝 `packages/better-auth/src/integrations/next-js.ts` (+1 -1) 📝 `packages/better-auth/src/integrations/svelte-kit.ts` (+1 -1) 📝 `packages/better-auth/src/integrations/tanstack-start-solid.ts` (+1 -1) 📝 `packages/better-auth/src/integrations/tanstack-start.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/access/types.ts` (+2 -0) 📝 `packages/better-auth/src/plugins/admin/client.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/admin/routes.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/custom-session/custom-session.test.ts` (+32 -0) 📝 `packages/better-auth/src/plugins/organization/client.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/organization/organization.ts` (+2 -2) 📝 `packages/oauth-provider/src/token.test.ts` (+137 -0) 📝 `packages/oauth-provider/src/token.ts` (+1 -1) 📝 `packages/oauth-provider/src/types/zod.ts` (+4 -1) 📝 `packages/prisma-adapter/src/prisma-adapter.ts` (+14 -0) 📝 `packages/sso/src/oidc.test.ts` (+133 -3) 📝 `packages/sso/src/routes/sso.ts` (+43 -31) </details> ### 📄 Description ## Summary Cherry-pick bug fixes from `canary` for v1.5.2 stable release: - **fix(sso):** prefer UserInfo endpoint over ID token and map sub claim correctly (#8276) - **fix(oauth-provider):** allow localhost subdomains in isLocalhost function (#8286) - **fix(cookies):** use lookahead heuristic for splitting Set-Cookie headers (#8301) - **fix:** access control indexing type (#8155) - **fix:** prevent double encoded cookie (#8133) - **fix(prisma-adapter):** use deleteMany when deleting by non-unique field (#8314) - **fix(oauth-provider):** customIdTokenClaims should override standard claims (#7865) 1 commit skipped (drizzle-adapter date transformation #8289 — already in main). ## Test plan - [x] `pnpm lint` — passed - [x] `pnpm typecheck` — no new errors introduced - [x] Cookie tests (68/68 passed) - [x] Organization/access control tests (174/174 passed) - [x] SSO tests — passed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:52:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#7901