Skip to main content

Setup

1

Get credentials

Go to linear.app/settings/api and click Create new OAuth application. Add your redirect URI:
2

Configure

lib/theauth.ts

Scopes

Default scopes: read Scopes are sent comma separated, as Linear requires.

How it works

  • Linear has no userinfo endpoint. The profile comes from a GraphQL viewer { id name email } query sent as a POST to https://api.linear.app/graphql.
  • PKCE (S256) is sent. Client credentials go in the form body.
  • The code exchange returns a refresh token, and getAccessToken refreshes through it. Access tokens last 24 hours.
  • Linear does not state whether the email is verified, so the OAuth plugin will not link a Linear login to an existing account by email.
linearProvider (the older preset, which cannot read Linear’s GraphQL profile) is still exported for existing code. Use createLinearProvider for new setups.
Vendor docs: Linear OAuth 2.0 authentication and GraphQL API.

Endpoints

Last modified on October 18, 2026