Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/site/migrations/0004_oauth_debug_log.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS oauth_debug_log (
id TEXT PRIMARY KEY,
createdAt INTEGER NOT NULL,
method TEXT NOT NULL,
path TEXT NOT NULL,
query TEXT,
headers TEXT,
requestBody TEXT,
responseStatus INTEGER,
responseBody TEXT
);
2 changes: 2 additions & 0 deletions apps/site/src/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ export function getAuth(origin: string, d1?: D1Database) {
jwt(),
mcp({
resource: `${origin}/mcp`,
resources: [`${origin}/mcp`, origin],
clientRegistrationDefaultResources: [`${origin}/mcp`, origin],
loginPage: "/sign-in",
consentPage: "/oauth2/consent",
allowDynamicClientRegistration: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const GET: APIRoute = async ({ locals }) => {
const origin = locals.siteUrl.origin;

const protectedResource = {
resource: origin,
resource: `${origin}/mcp`,
authorization_servers: [origin],
scopes_supported: [
"openid",
Expand Down
Loading
Loading