[GH-ISSUE #5045] Support Linear app-actor OAuth flow (actor=app) #10152

Closed
opened 2026-04-13 06:06:02 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @codybrouwers on GitHub (Oct 2, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/5045

Is this suited for github?

  • Yes, this is suited for github

The Better Auth Linear provider currently only supports user-centric OAuth flows.

Linear also supports app-actor authorization (actor=app in the authorization URL), which mints tokens that act as the application itself (not a user).
This flow is required for service accounts, agents, and automations, but the existing better-auth provider does not currently expose a way to request it.

Without support for actor=app:

  • All tokens are user-scoped.
  • Integrations cannot perform mutations (issue creation, comments, status changes) as the app.
  • Many automation and agent use cases are blocked.

References:

Describe the solution you'd like

  1. Authorization param support

    • Option A: Add a generic authorizationParams?: Record<string,string> forwarded to createAuthorizationURL.
    • Option B: Add a Linear-specific option (e.g. actor?: 'app' | 'user').
  2. Support for non-user “app actor” flows

    • Make the provider resilient to tokens without a user profile.
    • Allow skipping user linking and return raw OAuth credentials.
    • Alternatively, expose a variant of the provider that does not assume user identity.
  3. Documentation

    • Explain how to enable actor=app.
    • Clarify the implications (no user identity).
    • Provide example usage for service accounts and automations.

Describe alternatives you've considered

Currently I have written a custom OAuth2 provider with Better Auth primitives that enables me to do this but I would love to take advantage of Better Auth instead.

Additional context

No response

Originally created by @codybrouwers on GitHub (Oct 2, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/5045 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. The Better Auth Linear provider currently only supports user-centric OAuth flows. Linear also supports **app-actor authorization** (`actor=app` in the authorization URL), which mints tokens that act as the application itself (not a user). This flow is required for service accounts, agents, and automations, but the existing better-auth provider does not currently expose a way to request it. Without support for `actor=app`: - All tokens are user-scoped. - Integrations cannot perform mutations (issue creation, comments, status changes) as the app. - Many automation and agent use cases are blocked. References: - [Linear OAuth Actor Authorization](https://linear.app/developers/oauth-actor-authorization) - [Linear provider source](https://github.com/better-auth/better-auth/blob/778bf4043da54f03ac8c696cf8ae2549920ec78e/packages/better-auth/src/social-providers/linear.ts) - [Authorization URL builder](https://github.com/better-auth/better-auth/blob/778bf4043da54f03ac8c696cf8ae2549920ec78e/packages/better-auth/src/oauth2/create-authorization-url.ts) ### Describe the solution you'd like 1. **Authorization param support** - Option A: Add a generic `authorizationParams?: Record<string,string>` forwarded to `createAuthorizationURL`. - Option B: Add a Linear-specific option (e.g. `actor?: 'app' | 'user'`). 2. **Support for non-user “app actor” flows** - Make the provider resilient to tokens without a user profile. - Allow skipping user linking and return raw OAuth credentials. - Alternatively, expose a variant of the provider that does not assume user identity. 3. **Documentation** - Explain how to enable `actor=app`. - Clarify the implications (no user identity). - Provide example usage for service accounts and automations. ### Describe alternatives you've considered Currently I have written a custom OAuth2 provider with Better Auth primitives that enables me to do this but I would love to take advantage of Better Auth instead. ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 06:06:02 -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#10152