Skip to content

Commit 9f5a4d5

Browse files
feedback
1 parent de8d4d5 commit 9f5a4d5

File tree

1 file changed

+16
-0
lines changed
  • packages/web/src/app/api/(server)/ee/.well-known/oauth-protected-resource

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { apiHandler } from '@/lib/apiHandler';
2+
import { env } from '@sourcebot/shared';
3+
4+
// RFC 9728: OAuth 2.0 Protected Resource Metadata
5+
// Tells OAuth clients which authorization server protects this resource.
6+
// @see: https://datatracker.ietf.org/doc/html/rfc9728
7+
export const GET = apiHandler(async () => {
8+
const issuer = env.AUTH_URL.replace(/\/$/, '');
9+
10+
return Response.json({
11+
resource: `${issuer}/api/mcp`,
12+
authorization_servers: [
13+
issuer
14+
],
15+
});
16+
}, { track: false });

0 commit comments

Comments
 (0)