oauth: add tenant suffix to oauth flow (#1096)

This commit is contained in:
John Howard 2026-02-19 05:00:33 -08:00 • committed by GitHub
commit 695972a404
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -681,7 +681,7 @@ describe("AuthDebugger", () => {
const updateAuthState = jest.fn();
const mockResourceMetadata = {
resource: "https://example.com/mcp",
authorization_servers: ["https://custom-auth.example.com"],
authorization_servers: ["https://custom-auth.example.com/mcp/tenant"],
bearer_methods_supported: ["header", "body"],
resource_documentation: "https://example.com/mcp/docs",
resource_policy_uri: "https://example.com/mcp/policy",
@ -733,11 +733,17 @@ describe("AuthDebugger", () => {
expect(updateAuthState).toHaveBeenCalledWith(
expect.objectContaining({
resourceMetadata: mockResourceMetadata,
authServerUrl: new URL("https://custom-auth.example.com"),
authServerUrl: new URL(
"https://custom-auth.example.com/mcp/tenant",
),
oauthStep: "client_registration",
}),
);
});
expect(mockDiscoverAuthorizationServerMetadata).toHaveBeenCalledWith(
new URL("https://custom-auth.example.com/mcp/tenant"),
);
});
it("should handle protected resource metadata fetch failure gracefully", async () => {