@@ -681,7 +681,7 @@ describe("AuthDebugger", () => {
681681 const updateAuthState = jest . fn ( ) ;
682682 const mockResourceMetadata = {
683683 resource : "https://example.com/mcp" ,
684- authorization_servers : [ "https://custom-auth.example.com" ] ,
684+ authorization_servers : [ "https://custom-auth.example.com/mcp/tenant " ] ,
685685 bearer_methods_supported : [ "header" , "body" ] ,
686686 resource_documentation : "https://example.com/mcp/docs" ,
687687 resource_policy_uri : "https://example.com/mcp/policy" ,
@@ -733,11 +733,17 @@ describe("AuthDebugger", () => {
733733 expect ( updateAuthState ) . toHaveBeenCalledWith (
734734 expect . objectContaining ( {
735735 resourceMetadata : mockResourceMetadata ,
736- authServerUrl : new URL ( "https://custom-auth.example.com" ) ,
736+ authServerUrl : new URL (
737+ "https://custom-auth.example.com/mcp/tenant" ,
738+ ) ,
737739 oauthStep : "client_registration" ,
738740 } ) ,
739741 ) ;
740742 } ) ;
743+
744+ expect ( mockDiscoverAuthorizationServerMetadata ) . toHaveBeenCalledWith (
745+ new URL ( "https://custom-auth.example.com/mcp/tenant" ) ,
746+ ) ;
741747 } ) ;
742748
743749 it ( "should handle protected resource metadata fetch failure gracefully" , async ( ) => {
0 commit comments