@@ -328,7 +328,7 @@ async function httpToolCall(port, { endpoint = '/v2/mcp', id, headers, params })
328328 } ) ;
329329}
330330
331- test ( 'HTTP cloud transport preserves Firecrawl OAuth and well-known routes ' , async ( t ) => {
331+ test ( 'HTTP cloud keyless transport preserves app challenge without advertising OAuth ' , async ( t ) => {
332332 const backend = await startFakeFirecrawlBackend ( ) ;
333333 t . after ( ( ) => backend . close ( ) ) ;
334334 const port = await getFreePort ( ) ;
@@ -360,14 +360,7 @@ test('HTTP cloud transport preserves Firecrawl OAuth and well-known routes', asy
360360 const prm = await fetch (
361361 `http://127.0.0.1:${ port } /.well-known/oauth-protected-resource`
362362 ) ;
363- assert . equal ( prm . status , 200 ) ;
364- assert . deepEqual ( await prm . json ( ) , {
365- authorization_servers : [ backend . url ] ,
366- bearer_methods_supported : [ 'header' ] ,
367- resource : 'https://mcp.firecrawl.dev/v2/mcp' ,
368- resource_name : 'Firecrawl MCP' ,
369- scopes_supported : [ 'firecrawl:global' ] ,
370- } ) ;
363+ assert . equal ( prm . status , 404 ) ;
371364
372365 const unauthenticated = await fetch ( `http://127.0.0.1:${ port } /v2/mcp` , {
373366 body : JSON . stringify ( {
@@ -895,7 +888,7 @@ test('HTTP cloud transport swaps an fco_ OAuth token for its introspected API ke
895888 assert . equal ( stderr . includes ( 'TypeError' ) , false , stderr ) ;
896889} ) ;
897890
898- test ( 'HTTP cloud transport rejects an inactive fco_ token with an OAuth challenge ' , async ( t ) => {
891+ test ( 'HTTP cloud keyless transport rejects inactive OAuth without advertising login ' , async ( t ) => {
899892 const backend = await startFakeFirecrawlBackend ( ) ;
900893 t . after ( ( ) => backend . close ( ) ) ;
901894
@@ -926,10 +919,7 @@ test('HTTP cloud transport rejects an inactive fco_ token with an OAuth challeng
926919 assert . equal ( toolCall . status , 401 ) ;
927920 const wwwAuthenticate = toolCall . headers . get ( 'www-authenticate' ) ?? '' ;
928921 assert . match ( wwwAuthenticate , / ^ B e a r e r / ) ;
929- assert . match (
930- wwwAuthenticate ,
931- / r e s o u r c e _ m e t a d a t a = " h t t p s : \/ \/ m c p \. f i r e c r a w l \. d e v \/ \. w e l l - k n o w n \/ o a u t h - p r o t e c t e d - r e s o u r c e " /
932- ) ;
922+ assert . equal ( wwwAuthenticate . includes ( 'resource_metadata=' ) , false ) ;
933923 assert . match ( wwwAuthenticate , / e r r o r = " i n v a l i d _ t o k e n " / ) ;
934924 const body = await toolCall . json ( ) ;
935925 assert . equal ( body . error , 'invalid_token' ) ;
0 commit comments