[PR #2780] [CLOSED] fix: prevent parseState from overriding custom error url #4483

Closed
opened 2026-03-13 11:48:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2780
Author: @sebastiangollob
Created: 5/24/2025
Status: Closed

Base: mainHead: fix/error-url-override


📝 Commits (1)

  • 7153fb0 fix: remove default errorURL in parseState function

📊 Changes

1 file changed (+0 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/oauth2/state.ts (+0 -3)

📄 Description

This PR addresses an issue where parseState unconditionally sets a default errorURL if it's not found in the state object.

This behavior causes redirection to the default error page instead of the one configured via onAPIError.errorURL.


🔄 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/2780 **Author:** [@sebastiangollob](https://github.com/sebastiangollob) **Created:** 5/24/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/error-url-override` --- ### 📝 Commits (1) - [`7153fb0`](https://github.com/better-auth/better-auth/commit/7153fb03c6253e30e58e2e77b56bf24188472cd3) fix: remove default errorURL in parseState function ### 📊 Changes **1 file changed** (+0 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/oauth2/state.ts` (+0 -3) </details> ### 📄 Description This PR addresses an issue where `parseState` unconditionally sets a default `errorURL` if it's not found in the state object. This behavior causes redirection to the default error page instead of the one configured via `onAPIError.errorURL`. --- <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 11:48:44 -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#4483