[GH-ISSUE #2351] Allow dynamic modification of social provider options (e.g., accessType, prompt) when linking a social account #9160

Closed
opened 2026-04-13 04:31:30 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @abathellier on GitHub (Apr 18, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/2351

Currently, when linking a social account using linkSocial, it's possible to customize the scopes dynamically, but it's not possible to modify the provider options such as accessType or prompt.

Describe the solution you'd like

It would be very useful to be able to dynamically set these parameters when linking a social account, just like we can with scopes.

Example

await authClient.linkSocial({
  provider: "google",
  callbackURL: "/",
  scopes: ["https://www.googleapis.com/auth/business.manage"],
  options: {
    accessType: "offline",
    prompt: "consent",
}});

Describe alternatives you've considered

  • Create a custom OAuth provider with different default options for the same service (e.g., a second Google provider configuration).
  • Always apply accessType: offline and prompt: consent for all users (not ideal for all flows).
  • Stop using Better-Auth and implement a fully custom OAuth linking endpoint.
Originally created by @abathellier on GitHub (Apr 18, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/2351 ### Is your feature request related to a problem? Please describe. Currently, when linking a social account using `linkSocial`, it's possible to customize the scopes dynamically, but it's not possible to modify the provider options such as `accessType` or `prompt`. ### Describe the solution you'd like It would be very useful to be able to dynamically set these parameters when linking a social account, just like we can with scopes. **Example** ```ts await authClient.linkSocial({ provider: "google", callbackURL: "/", scopes: ["https://www.googleapis.com/auth/business.manage"], options: { accessType: "offline", prompt: "consent", }}); ``` ### Describe alternatives you've considered - Create a custom OAuth provider with different default options for the same service (e.g., a second Google provider configuration). - Always apply `accessType: offline` and `prompt: consent` for all users (not ideal for all flows). - Stop using Better-Auth and implement a fully custom OAuth linking endpoint.
GiteaMirror added the enhancementlocked labels 2026-04-13 04:31:30 -05:00
Author
Owner

@arthberman commented on GitHub (Jun 7, 2025):

+1

<!-- gh-comment-id:2952504164 --> @arthberman commented on GitHub (Jun 7, 2025): +1
Author
Owner

@chrisdadev13 commented on GitHub (Jun 24, 2025):

+1

<!-- gh-comment-id:3000981795 --> @chrisdadev13 commented on GitHub (Jun 24, 2025): +1
Author
Owner

@w8flash commented on GitHub (Jul 8, 2025):

Hello, do you have news about this implementation ?

<!-- gh-comment-id:3047787095 --> @w8flash commented on GitHub (Jul 8, 2025): Hello, do you have news about this implementation ?
Author
Owner

@dosubot[bot] commented on GitHub (Oct 7, 2025):

Hi, @durdenx. 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 the ability to dynamically set social provider options like accessType and prompt during social account linking via linkSocial.
  • Currently, only scopes can be customized, and you suggested adding an options parameter for more flexible provider-specific settings.
  • Several users, including arthberman and chrisdadev13, have shown support for this feature.
  • Another user, w8flash, asked about updates on the implementation.
  • No maintainers have provided updates or plans regarding this feature yet.

Next Steps:

  • Please let me know if this feature request is still relevant to the latest version of better-auth by commenting on this issue.
  • If I don’t hear back within 7 days, this issue will be automatically closed.

Thanks for your understanding and contribution!

<!-- gh-comment-id:3377560541 --> @dosubot[bot] commented on GitHub (Oct 7, 2025): Hi, @durdenx. 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 the ability to dynamically set social provider options like `accessType` and `prompt` during social account linking via `linkSocial`. - Currently, only scopes can be customized, and you suggested adding an options parameter for more flexible provider-specific settings. - Several users, including arthberman and chrisdadev13, have shown support for this feature. - Another user, w8flash, asked about updates on the implementation. - No maintainers have provided updates or plans regarding this feature yet. **Next Steps:** - Please let me know if this feature request is still relevant to the latest version of better-auth by commenting on this issue. - If I don’t hear back within 7 days, this issue will be automatically closed. Thanks for your understanding and contribution!
Author
Owner

@psv2522 commented on GitHub (Oct 9, 2025):

Still relevant

<!-- gh-comment-id:3386228317 --> @psv2522 commented on GitHub (Oct 9, 2025): Still relevant
Author
Owner

@dosubot[bot] commented on GitHub (Jan 8, 2026):

Hi, @durdenx. 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 the ability to dynamically customize social provider options like accessType and prompt during social account linking via linkSocial.
  • Several users have shown support for this feature, indicating community interest.
  • A team member marked the issue as stale due to no maintainer updates or plans shared yet.
  • No resolution or implementation timeline has been provided so far.

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 don’t hear back within 7 days, I will automatically close the issue.

Thanks for your understanding and contribution!

<!-- gh-comment-id:3724599406 --> @dosubot[bot] commented on GitHub (Jan 8, 2026): Hi, @durdenx. 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 the ability to dynamically customize social provider options like `accessType` and `prompt` during social account linking via `linkSocial`. - Several users have shown support for this feature, indicating community interest. - A team member marked the issue as stale due to no maintainer updates or plans shared yet. - No resolution or implementation timeline has been provided so far. **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 don’t hear back within 7 days, I will automatically close the issue. Thanks 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#9160