@better-auth/mcp 1.7.0-rc.5 → 1.7.0
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/dist/index.d.mts +1 -0
- package/dist/index.mjs +2 -2
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import { DpopReplayReservations, DpopReplayStore } from "better-auth/oauth2";
|
|
|
3
3
|
import { Awaitable } from "@better-auth/core";
|
|
4
4
|
import { JWTPayload, JWTVerifyOptions } from "jose";
|
|
5
5
|
import { BetterAuthOptions } from "better-auth/types";
|
|
6
|
+
|
|
6
7
|
//#region src/handler.d.ts
|
|
7
8
|
interface McpProtectedRequestHandlerOptions {
|
|
8
9
|
/** Expected authorization-server issuer for the access token. */
|
package/dist/index.mjs
CHANGED
|
@@ -86,7 +86,7 @@ const createMcpProtectedRequestHandler = (options, handler) => {
|
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/plugin.ts
|
|
88
88
|
const PROTECTED_RESOURCE_METADATA_PATH = "/.well-known/oauth-protected-resource";
|
|
89
|
-
const AUTHORIZATION_SERVER_ONLY_SCOPES =
|
|
89
|
+
const AUTHORIZATION_SERVER_ONLY_SCOPES = new Set([
|
|
90
90
|
"openid",
|
|
91
91
|
"profile",
|
|
92
92
|
"email",
|
|
@@ -189,7 +189,7 @@ const mcp = (options) => {
|
|
|
189
189
|
} catch {
|
|
190
190
|
resourcePath = "";
|
|
191
191
|
}
|
|
192
|
-
if (!
|
|
192
|
+
if (!new Set([PROTECTED_RESOURCE_METADATA_PATH, `${PROTECTED_RESOURCE_METADATA_PATH}${resourcePath}`]).has(requestPath)) return;
|
|
193
193
|
if (request.method !== "GET" && request.method !== "HEAD") return { response: new Response(null, {
|
|
194
194
|
status: 405,
|
|
195
195
|
headers: { Allow: "GET, HEAD" }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/mcp",
|
|
3
|
-
"version": "1.7.0
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Model Context Protocol (MCP) plugin for Better Auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,20 +47,20 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"jose": "^6.1.3",
|
|
50
|
-
"@better-auth/oauth-provider": "^1.7.0
|
|
50
|
+
"@better-auth/oauth-provider": "^1.7.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@modelcontextprotocol/client": "2.0.0",
|
|
54
54
|
"@modelcontextprotocol/server": "2.0.0",
|
|
55
55
|
"better-call": "1.4.0",
|
|
56
|
-
"tsdown": "0.
|
|
57
|
-
"@better-auth/core": "1.7.0
|
|
58
|
-
"better-auth": "1.7.0
|
|
56
|
+
"tsdown": "0.21.10",
|
|
57
|
+
"@better-auth/core": "1.7.0",
|
|
58
|
+
"better-auth": "1.7.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"better-call": "1.4.0",
|
|
62
|
-
"@better-auth/core": "^1.7.0
|
|
63
|
-
"better-auth": "^1.7.0
|
|
62
|
+
"@better-auth/core": "^1.7.0",
|
|
63
|
+
"better-auth": "^1.7.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "tsdown",
|