@zgeoff/mcp-auth 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgeoff/mcp-auth",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner",
5
5
  "keywords": [
6
6
  "better-auth",
@@ -45,8 +45,8 @@
45
45
  "@better-auth/mcp": "1.7.15",
46
46
  "@better-auth/oauth-provider": "1.7.15",
47
47
  "@simplewebauthn/server": "14.1.0",
48
- "@zgeoff/kysely-bun-sqlite": "0.4.0",
49
- "@zgeoff/std": "0.5.0",
48
+ "@zgeoff/kysely-bun-sqlite": "0.5.1",
49
+ "@zgeoff/std": "0.7.0",
50
50
  "better-auth": "1.7.15",
51
51
  "reflect-metadata": "0.2.2",
52
52
  "ts-pattern": "5.9.2",
@@ -3,7 +3,6 @@ import { mcp } from '@better-auth/mcp';
3
3
  import { oauthProvider } from '@better-auth/oauth-provider';
4
4
  import type { OAuthOptions, Scope as ProviderScope } from '@better-auth/oauth-provider';
5
5
  import { betterAuth } from 'better-auth';
6
- import type { BetterAuthPlugin } from 'better-auth';
7
6
  import type { Kysely } from 'kysely';
8
7
  import type { MCPAuthPaths } from '../types.ts';
9
8
  import { deriveTokenHash } from '../utils/derive-token-hash.ts';
@@ -86,19 +85,8 @@ export function createAuthServer(options: AuthServerOptions) {
86
85
  lastUsedAt: { type: 'date', required: false, input: false },
87
86
  },
88
87
  },
89
-
90
- // The provider's endpoint types do not satisfy the plugin type under
91
- // exactOptionalPropertyTypes.
92
- plugins: [toBetterAuthPlugin(provider), createGrantPlugin()],
88
+ plugins: [provider, createGrantPlugin()],
93
89
  });
94
90
  }
95
91
 
96
- // The exported signature states the type that better-auth takes; the implementation passes the
97
- // provider on as it is.
98
- function toBetterAuthPlugin(plugin: ReturnType<typeof oauthProvider>): BetterAuthPlugin;
99
-
100
- function toBetterAuthPlugin(plugin: unknown): unknown {
101
- return plugin;
102
- }
103
-
104
92
  export type AuthServer = ReturnType<typeof createAuthServer>;