new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Better Auth · Authentication · all subjects

social sign-on/linear

7 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Linear provider credentials location

Linear client ID and client secret can be obtained from the Linear Developer Portal at https://linear.app/settings/api.

Linear redirect URL configuration

The redirect URL for Linear OAuth should be set to http://localhost:3000/api/auth/callback/linear for local development, and updated to your production application URL for production. If you change the base path of the auth routes, you must update the redirect URL accordingly.

Linear OAuth scope requirements

When creating an OAuth application in Linear, you must specify required scopes. The default scope is read, but you can also request additional scopes like write if needed.

Linear provider configuration code

To configure the Linear provider in Better Auth, import betterAuth and pass the provider configuration to the socialProviders option with clientId and clientSecret from environment variables: import { betterAuth } from "better-auth" export const auth = betterAuth({ socialProviders: { linear: { clientId: process.env.LINEAR_CLIENT_ID as string, clientSecret: process.env.LINEAR_CLIENT_SECRET as string, }, }, })

Linear sign-in usage

To sign in with Linear, use the signIn.social function with provider set to "linear": import { createAuthClient } from "better-auth/client" const authClient = createAuthClient() const signIn = async () => { const data = await authClient.signIn.social({ provider: "linear" }) }

Linear OAuth available scopes

Linear OAuth supports the following scopes: read (default) provides read access for the user's account; write provides write access for the user's account; issues:create allows creating new issues and their attachments; comments:create allows creating new issue comments; timeSchedule:write allows creating and modifying time schedules; admin provides full access to admin level endpoints and should be used with caution.

Linear provider scope configuration

You can specify additional scopes when configuring the Linear provider by adding a scope property with an array of scope strings: export const auth = betterAuth({ socialProviders: { linear: { clientId: process.env.LINEAR_CLIENT_ID as string, clientSecret: process.env.LINEAR_CLIENT_SECRET as string, scope: ["read", "write"] }, }, })

Give your agent this brain