File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
examples/servers/simple-auth/mcp_simple_auth Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- """Simple MCP server with GitHub OAuth authentication."""
1+ """Simple MCP server with GitHub OAuth authentication."""
Original file line number Diff line number Diff line change 44
55from mcp_simple_auth .server import main
66
7- sys .exit (main ())
7+ sys .exit (main ())
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ async def authorize(
103103 f"{ self .settings .github_auth_url } "
104104 f"?client_id={ self .settings .github_client_id } "
105105 f"&redirect_uri={ self .settings .github_callback_path } "
106- f"&scope={ self .settings .github_scope } " # Only request user scope for minimal example
106+ f"&scope={ self .settings .github_scope } "
107107 f"&state={ state } "
108108 )
109109
@@ -200,7 +200,8 @@ async def exchange_authorization_code(
200200 for token , data in self .tokens .items ()
201201 # see https://github.blog/engineering/platform-security/behind-githubs-new-authentication-token-formats/
202202 # which you get depends on your GH app setup.
203- if (token .startswith ("ghu_" ) or token .startswith ('gho_' )) and data .client_id == client .client_id
203+ if (token .startswith ("ghu_" ) or token .startswith ("gho_" ))
204+ and data .client_id == client .client_id
204205 ),
205206 None ,
206207 )
@@ -243,7 +244,7 @@ async def exchange_refresh_token(
243244 refresh_token : RefreshToken ,
244245 scopes : list [str ],
245246 ) -> OAuthToken :
246- """Exchange refresh token """
247+ """Exchange refresh token"""
247248 raise NotImplementedError ("Not supported" )
248249
249250 async def revoke_token (
You can’t perform that action at this time.
0 commit comments