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/vercel

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

Vercel provider credentials setup

To use Sign in with Vercel, you need a client ID and client secret obtained from the Vercel Dashboard by creating a Vercel App. The redirect URL must be set to http://localhost:3000/api/auth/callback/vercel for local development, or to your application's URL for production. If the base path of auth routes is changed, the redirect URL must be updated accordingly.

Vercel PKCE requirement

Vercel requires PKCE (Proof Key for Code Exchange) for enhanced security. This is automatically handled by Better Auth and does not require manual configuration.

Vercel provider configuration example

import { betterAuth } from "better-auth" export const auth = betterAuth({ socialProviders: { vercel: { clientId: process.env.VERCEL_CLIENT_ID as string, clientSecret: process.env.VERCEL_CLIENT_SECRET as string, }, }, })

Sign in with Vercel using client

import { createAuthClient } from "better-auth/client" const authClient = createAuthClient() const signIn = async () => { const data = await authClient.signIn.social({ provider: "vercel" }) }

Vercel OpenID Connect scopes

Vercel supports the following OpenID Connect scopes: openid (default, returns user's unique identifier in ID token), email (returns user's email address), profile (returns user's profile information including name and picture), and offline_access (returns a refresh token for offline access). Scopes are configured on the Vercel App itself. When a scope parameter is passed to the provider, it has the effect of requesting a subset of the scopes configured on the Vercel App.

Vercel scope configuration example

import { betterAuth } from "better-auth" export const auth = betterAuth({ socialProviders: { vercel: { clientId: process.env.VERCEL_CLIENT_ID as string, clientSecret: process.env.VERCEL_CLIENT_SECRET as string, scope: ["openid", "email", "profile"], }, }, })

Give your agent this brain