[GH-ISSUE #2905] Ability to redirect in a new tab using fetch-plugin #18020

Closed
opened 2026-04-15 16:22:30 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @emilwidlund on GitHub (Jun 4, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/2905

Is this suited for github?

  • Yes, this is suited for github

Returning redirect: true and a URL in a fetch-response from the server, will make the browser redirect to the given url. This redirection will always happen in the current tab.

Describe the solution you'd like

I want the ability to return a target property with the fetch redirect-response payload, which specifies how the redirection should happen - in the current tab, or another tab, etc.

target: '_blank' would for example open the url in a new tab.

Describe alternatives you've considered

The proposal above is the only feasible option.

Additional context

No response

Originally created by @emilwidlund on GitHub (Jun 4, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/2905 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Returning `redirect: true` and a URL in a fetch-response from the server, will make the browser redirect to the given url. This redirection will always happen in the current tab. ### Describe the solution you'd like I want the ability to return a `target` property with the fetch redirect-response payload, which specifies how the redirection should happen - in the current tab, or another tab, etc. `target: '_blank'` would for example open the url in a new tab. ### Describe alternatives you've considered The proposal above is the only feasible option. ### Additional context _No response_
GiteaMirror added the locked label 2026-04-15 16:22:31 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 3, 2025):

Hi, @emilwidlund. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested an enhancement to the fetch-plugin to support a target property in redirect responses.
  • The goal is to allow redirects to open in a new tab (e.g., target: '_blank') instead of always opening in the current tab.
  • This would enable more flexible redirection behavior controlled by the server's response.
  • There has been no further discussion or activity on this issue since it was opened.

Next Steps:

  • Please let me know if this feature is still relevant to the latest version of better-auth by commenting on this issue.
  • If I do not hear back within 7 days, I will automatically close this issue.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3249862186 --> @dosubot[bot] commented on GitHub (Sep 3, 2025): Hi, @emilwidlund. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested an enhancement to the fetch-plugin to support a `target` property in redirect responses. - The goal is to allow redirects to open in a new tab (e.g., `target: '_blank'`) instead of always opening in the current tab. - This would enable more flexible redirection behavior controlled by the server's response. - There has been no further discussion or activity on this issue since it was opened. **Next Steps:** - Please let me know if this feature is still relevant to the latest version of better-auth by commenting on this issue. - If I do not hear back within 7 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#18020