Skip to content

Commit 88984c7

Browse files
Linting
1 parent 19ee9fa commit 88984c7

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

client/src/components/OAuthCallback.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ const OAuthCallback = () => {
2525
}
2626

2727
try {
28-
const result = await auth(authProvider, { serverUrl, authorizationCode: code });
28+
const result = await auth(authProvider, {
29+
serverUrl,
30+
authorizationCode: code,
31+
});
2932
if (result !== "AUTHORIZED") {
30-
throw new Error(`Expected to be authorized after providing auth code, got: ${result}`);
33+
throw new Error(
34+
`Expected to be authorized after providing auth code, got: ${result}`,
35+
);
3136
}
3237

3338
// Redirect back to the main app with server URL to trigger auto-connect

client/src/lib/auth.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
2-
import { OAuthClientInformationSchema, OAuthClientInformation, OAuthTokens, OAuthTokensSchema } from "@modelcontextprotocol/sdk/shared/auth.js";
2+
import {
3+
OAuthClientInformationSchema,
4+
OAuthClientInformation,
5+
OAuthTokens,
6+
OAuthTokensSchema,
7+
} from "@modelcontextprotocol/sdk/shared/auth.js";
38
import { SESSION_KEYS } from "./constants";
49

510
class InspectorOAuthClientProvider implements OAuthClientProvider {
@@ -44,21 +49,15 @@ class InspectorOAuthClientProvider implements OAuthClientProvider {
4449
}
4550

4651
saveTokens(tokens: OAuthTokens) {
47-
sessionStorage.setItem(
48-
SESSION_KEYS.TOKENS,
49-
JSON.stringify(tokens),
50-
);
52+
sessionStorage.setItem(SESSION_KEYS.TOKENS, JSON.stringify(tokens));
5153
}
5254

5355
redirectToAuthorization(authorizationUrl: URL) {
5456
window.location.href = authorizationUrl.href;
5557
}
5658

5759
saveCodeVerifier(codeVerifier: string) {
58-
sessionStorage.setItem(
59-
SESSION_KEYS.CODE_VERIFIER,
60-
codeVerifier,
61-
);
60+
sessionStorage.setItem(SESSION_KEYS.CODE_VERIFIER, codeVerifier);
6261
}
6362

6463
codeVerifier() {

0 commit comments

Comments
 (0)