Skip to content

Commit 11bc043

Browse files
committed
whitespace
1 parent 03bb303 commit 11bc043

File tree

2 files changed

+43
-43
lines changed

2 files changed

+43
-43
lines changed

client/src/components/AuthDebugger.tsx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -242,47 +242,47 @@ const AuthDebugger = ({
242242
)}
243243

244244
<div className="space-y-4">
245-
{authState.oauthTokens && (
246-
<div className="space-y-2">
247-
<p className="text-sm font-medium">Access Token:</p>
248-
<div className="bg-muted p-2 rounded-md text-xs overflow-x-auto">
249-
{authState.oauthTokens.access_token.substring(0, 25)}...
250-
</div>
245+
{authState.oauthTokens && (
246+
<div className="space-y-2">
247+
<p className="text-sm font-medium">Access Token:</p>
248+
<div className="bg-muted p-2 rounded-md text-xs overflow-x-auto">
249+
{authState.oauthTokens.access_token.substring(0, 25)}...
251250
</div>
252-
)}
253-
254-
<div className="flex gap-4">
255-
<Button
256-
variant="outline"
257-
onClick={startOAuthFlow}
258-
disabled={authState.isInitiatingAuth}
259-
>
260-
{authState.oauthTokens
261-
? "Guided Token Refresh"
262-
: "Guided OAuth Flow"}
263-
</Button>
251+
</div>
252+
)}
264253

265-
<Button
266-
onClick={handleQuickOAuth}
267-
disabled={authState.isInitiatingAuth}
268-
>
269-
{authState.isInitiatingAuth
270-
? "Initiating..."
271-
: authState.oauthTokens
272-
? "Quick Refresh"
273-
: "Quick OAuth Flow"}
274-
</Button>
254+
<div className="flex gap-4">
255+
<Button
256+
variant="outline"
257+
onClick={startOAuthFlow}
258+
disabled={authState.isInitiatingAuth}
259+
>
260+
{authState.oauthTokens
261+
? "Guided Token Refresh"
262+
: "Guided OAuth Flow"}
263+
</Button>
275264

276-
<Button variant="outline" onClick={handleClearOAuth}>
277-
Clear OAuth State
278-
</Button>
279-
</div>
265+
<Button
266+
onClick={handleQuickOAuth}
267+
disabled={authState.isInitiatingAuth}
268+
>
269+
{authState.isInitiatingAuth
270+
? "Initiating..."
271+
: authState.oauthTokens
272+
? "Quick Refresh"
273+
: "Quick OAuth Flow"}
274+
</Button>
280275

281-
<p className="text-xs text-muted-foreground">
282-
Choose "Guided" for step-by-step instructions or "Quick" for
283-
the standard automatic flow.
284-
</p>
276+
<Button variant="outline" onClick={handleClearOAuth}>
277+
Clear OAuth State
278+
</Button>
285279
</div>
280+
281+
<p className="text-xs text-muted-foreground">
282+
Choose "Guided" for step-by-step instructions or "Quick" for
283+
the standard automatic flow.
284+
</p>
285+
</div>
286286
</div>
287287

288288
<OAuthFlowProgress

client/src/components/__tests__/AuthDebugger.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe("AuthDebugger", () => {
107107
mockDiscoverOAuthMetadata.mockResolvedValue(mockOAuthMetadata);
108108
mockRegisterClient.mockResolvedValue(mockOAuthClientInfo);
109109
mockDiscoverOAuthProtectedResourceMetadata.mockRejectedValue(
110-
new Error("No protected resource metadata found")
110+
new Error("No protected resource metadata found"),
111111
);
112112
mockStartAuthorization.mockImplementation(async (_sseUrl, options) => {
113113
const authUrl = new URL("https://oauth.example.com/authorize");
@@ -503,7 +503,7 @@ describe("AuthDebugger", () => {
503503

504504
// Mock successful metadata discovery
505505
mockDiscoverOAuthProtectedResourceMetadata.mockResolvedValue(
506-
mockResourceMetadata
506+
mockResourceMetadata,
507507
);
508508
mockDiscoverOAuthMetadata.mockResolvedValue(mockOAuthMetadata);
509509

@@ -536,7 +536,7 @@ describe("AuthDebugger", () => {
536536
// Wait for the metadata to be fetched
537537
await waitFor(() => {
538538
expect(mockDiscoverOAuthProtectedResourceMetadata).toHaveBeenCalledWith(
539-
"https://example.com"
539+
"https://example.com",
540540
);
541541
});
542542

@@ -547,7 +547,7 @@ describe("AuthDebugger", () => {
547547
resourceMetadata: mockResourceMetadata,
548548
authServerUrl: new URL("https://custom-auth.example.com"),
549549
oauthStep: "client_registration",
550-
})
550+
}),
551551
);
552552
});
553553
});
@@ -582,7 +582,7 @@ describe("AuthDebugger", () => {
582582
// Wait for the metadata fetch to fail
583583
await waitFor(() => {
584584
expect(mockDiscoverOAuthProtectedResourceMetadata).toHaveBeenCalledWith(
585-
"https://example.com"
585+
"https://example.com",
586586
);
587587
});
588588

@@ -594,13 +594,13 @@ describe("AuthDebugger", () => {
594594
// Should use the original server URL as fallback
595595
authServerUrl: new URL("https://example.com"),
596596
oauthStep: "client_registration",
597-
})
597+
}),
598598
);
599599
});
600600

601601
// Verify that regular OAuth metadata discovery was still called
602602
expect(mockDiscoverOAuthMetadata).toHaveBeenCalledWith(
603-
new URL("https://example.com")
603+
new URL("https://example.com"),
604604
);
605605
});
606606
});

0 commit comments

Comments
 (0)