Skip to content

Commit 22383da

Browse files
author
Lasim
committed
fix(backend): update redirect URI patterns for Claude.ai MCP OAuth
1 parent 0f1ee1b commit 22383da

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

services/backend/src/services/oauth/authorizationService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ export class AuthorizationService {
125125
/^vscode:\/\/.*\/auth\/callback$/,
126126
// Cursor patterns
127127
/^cursor:\/\/.*\/oauth\/callback$/,
128-
// Claude.ai custom connector patterns
129-
/^https:\/\/claude\.ai\/mcp\/auth\/callback$/
128+
// Claude.ai MCP OAuth callback patterns (RFC 9728 compliant)
129+
/^https:\/\/claude\.ai\/api\/mcp\/auth_callback$/,
130+
/^https:\/\/claude\.com\/api\/mcp\/auth_callback$/ // Future-proofing for domain migration
130131
];
131132

132133
return allowedPatterns.some(pattern => pattern.test(redirectUri));

services/satellite/src/routes/oauth-discovery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { type FastifyInstance } from 'fastify';
77
*/
88
export default async function oauthDiscoveryRoutes(server: FastifyInstance) {
99
const backendUrl = process.env.DEPLOYSTACK_BACKEND_URL || 'http://localhost:3000';
10-
const satelliteUrl = `http://localhost:${process.env.PORT || 3001}`;
10+
const satelliteUrl = process.env.DEPLOYSTACK_SATELLITE_URL || `http://localhost:${process.env.PORT || 3001}`;
1111

1212
// RFC 9728: OAuth 2.0 Protected Resource Metadata
1313
server.get('/.well-known/oauth-protected-resource', {

0 commit comments

Comments
 (0)