Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

[Release] Version packages#31

Merged
zbeyens merged 1 commit into
mainfrom
changeset-release/main
Dec 18, 2025
Merged

[Release] Version packages#31
zbeyens merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

better-auth-convex@0.5.0

Minor Changes

  • #30 cc1ca02 Thanks @zbeyens! - ### @convex-dev/better-auth 0.10

    This release updates better-auth-convex to work with @convex-dev/better-auth@0.10.4 and better-auth@1.4.7.

    For the upstream migration guide, see: https://labs.convex.dev/better-auth/migrations/migrate-to-0-10

    Breaking Changes

    createApi signature changed

    The second parameter is now createAuth function instead of spread auth options:

    // Before
    export const { create, ... } = createApi(schema, {
      ...auth.options,
      skipValidation: true,
    });
    
    // After
    export const { create, ... } = createApi(schema, createAuth, {
      skipValidation: true,
    });

    authClient.adapter signature changed

    Now takes createAuthOptions function instead of options object:

    // Before
    database: authClient.adapter(ctx, auth.options),
    
    // After
    database: authClient.adapter(ctx, createAuthOptions),

    createAuth pattern replaced

    The static auth instance with optionsOnly is replaced by createAuthOptions factory:

    // Before
    export const createAuth = (ctx, { optionsOnly } = { optionsOnly: false }) => {
      return betterAuth({ ... });
    };
    export const auth = createAuth({}, { optionsOnly: true });
    
    // After
    export const createAuthOptions = (ctx) => ({
      baseURL: process.env.SITE_URL!,
      plugins: [convex({ authConfig, jwks: process.env.JWKS })],
      // ...
    }) satisfies BetterAuthOptions;
    
    export const createAuth = (ctx) => betterAuth(createAuthOptions(ctx));

    New Features

    Static JWKS exports

    createApi now exports getLatestJwks and rotateKeys for static JWKS management:

    export const {
      create,
      // ... other exports
      getLatestJwks,
      rotateKeys,
    } = createApi(schema, createAuth, { skipValidation: true });

    After deploying, generate JWKS:

    npx convex run auth:getLatestJwks | npx convex env set JWKS

    Migration Steps

    1. Update dependencies:

      pnpm add better-auth@1.4.7 @convex-dev/better-auth@0.10.4
    2. Update convex/auth.config.ts:

      export default {
        providers: [getAuthConfigProvider({ jwks: process.env.JWKS })],
      } satisfies AuthConfig;
    3. Update convex/auth.ts:

      • Replace auth static instance with createAuthOptions factory
      • Update createApi call signature
      • Update getAuth to use createAuthOptions
      • Add getLatestJwks and rotateKeys to exports
    4. Deploy and generate JWKS:

      npx convex run auth:getLatestJwks | npx convex env set JWKS

    See the README for complete setup examples.

@zbeyens zbeyens merged commit 728ce5c into main Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant