[PR #5136] [CLOSED] fix(oidc): early cleanup prompt cookie #14050

Closed
opened 2026-04-13 09:17:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5136
Author: @Bekacru
Created: 10/7/2025
Status: Closed

Base: canaryHead: fix/oidc-prompt


📝 Commits (2)

  • 028b351 fix(oidc): cleanup oidc prompt cookie early
  • ebf3190 fix(oidc): cleanup oidc prompt cookie early

📊 Changes

2 files changed (+8 additions, -7 deletions)

View changed files

📝 packages/better-auth/src/plugins/mcp/index.ts (+3 -3)
📝 packages/better-auth/src/plugins/oidc-provider/index.ts (+5 -4)

📄 Description

closes #4594


Summary by cubic

Clear the OIDC login prompt cookie earlier in the auth flow to prevent stale state and repeated prompts when no session token is set. Fixes Linear #4594.

  • Bug Fixes
    • Clear oidc_login_prompt immediately after reading it in MCP and OIDC provider middleware.
    • Avoids leftover prompt cookie when the session token isn’t present, preventing prompt loops.

🔄 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/5136 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 10/7/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/oidc-prompt` --- ### 📝 Commits (2) - [`028b351`](https://github.com/better-auth/better-auth/commit/028b351b0b89bd9b41b9ca0f5035f8b62197b761) fix(oidc): cleanup oidc prompt cookie early - [`ebf3190`](https://github.com/better-auth/better-auth/commit/ebf3190787e452b143ccaa35a52a84dd5792ead2) fix(oidc): cleanup oidc prompt cookie early ### 📊 Changes **2 files changed** (+8 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/mcp/index.ts` (+3 -3) 📝 `packages/better-auth/src/plugins/oidc-provider/index.ts` (+5 -4) </details> ### 📄 Description closes #4594 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Clear the OIDC login prompt cookie earlier in the auth flow to prevent stale state and repeated prompts when no session token is set. Fixes Linear #4594. - **Bug Fixes** - Clear oidc_login_prompt immediately after reading it in MCP and OIDC provider middleware. - Avoids leftover prompt cookie when the session token isn’t present, preventing prompt loops. <!-- End of auto-generated description by cubic. --> --- <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-04-13 09:17:20 -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#14050