[GH-ISSUE #3738] Support disableRedirect: true option in linkSocial method for popup-based OAuth flow #9706

Closed
opened 2026-04-13 05:21:58 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Abdelrahmanaman on GitHub (Aug 1, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3738

Is this suited for github?

  • Yes, this is suited for github

We're integrating social linking using authClient.linkSocial, and we would like to prevent the default redirect behavior in favor of handling the flow via a popup window. This is important for preserving application state during the linking process.

Currently, attempting to pass a disableRedirect: true option leads to a TypeScript error:

Object literal may only specify known properties, and 'disableRedirect' does not exist in type 'Prettify<{
  provider: unknown;
  callbackURL?: string | undefined;
  idToken?: {
    token: string;
    nonce?: string | undefined;
    accessToken?: string | undefined;
    refreshToken?: string | undefined;
    scopes?: string[] | undefined;
  } | undefined;
  requestSignUp?: boolean | undefined;
  scopes?: string[] | undefined;
  errorCallbackURL?: string | undefined;
}>'.ts(2353)

Describe the solution you'd like

We’d like the linkSocial method in authClient to support a disableRedirect: true option (or similar) that allows the OAuth flow to open in a popup or new tab instead of redirecting the main browser window.

THis would make it possible to :

  • Preserve app state during linking flow
  • Preserve application state during the social linking flow
  • Avoid a full page reload

const { data } = await authClient.linkSocial({
  provider: 'linear',
  disableRedirect: true
})




### Describe alternatives you've considered

  -

### Additional context

 
Originally created by @Abdelrahmanaman on GitHub (Aug 1, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3738 ### Is this suited for github? - [ ] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. We're integrating social linking using `authClient.linkSocial`, and we would like to prevent the default redirect behavior in favor of handling the flow via a popup window. This is important for preserving application state during the linking process. Currently, attempting to pass a `disableRedirect: true` option leads to a TypeScript error: ```ts Object literal may only specify known properties, and 'disableRedirect' does not exist in type 'Prettify<{ provider: unknown; callbackURL?: string | undefined; idToken?: { token: string; nonce?: string | undefined; accessToken?: string | undefined; refreshToken?: string | undefined; scopes?: string[] | undefined; } | undefined; requestSignUp?: boolean | undefined; scopes?: string[] | undefined; errorCallbackURL?: string | undefined; }>'.ts(2353) ``` ### Describe the solution you'd like We’d like the linkSocial method in authClient to support a disableRedirect: true option (or similar) that allows the OAuth flow to open in a popup or new tab instead of redirecting the main browser window. THis would make it possible to : - Preserve app state during linking flow - Preserve application state during the social linking flow - Avoid a full page reload ```typescript const { data } = await authClient.linkSocial({ provider: 'linear', disableRedirect: true }) ### Describe alternatives you've considered - ### Additional context
GiteaMirror added the enhancementlocked labels 2026-04-13 05:21:58 -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#9706