File tree 3 files changed +6
-5
lines changed
examples/servers/simple-auth/mcp_simple_auth 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 4
4
5
5
from mcp_simple_auth .server import main
6
6
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(
103
103
f"{ self .settings .github_auth_url } "
104
104
f"?client_id={ self .settings .github_client_id } "
105
105
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 } "
107
107
f"&state={ state } "
108
108
)
109
109
@@ -200,7 +200,8 @@ async def exchange_authorization_code(
200
200
for token , data in self .tokens .items ()
201
201
# see https://github.blog/engineering/platform-security/behind-githubs-new-authentication-token-formats/
202
202
# 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
204
205
),
205
206
None ,
206
207
)
@@ -243,7 +244,7 @@ async def exchange_refresh_token(
243
244
refresh_token : RefreshToken ,
244
245
scopes : list [str ],
245
246
) -> OAuthToken :
246
- """Exchange refresh token """
247
+ """Exchange refresh token"""
247
248
raise NotImplementedError ("Not supported" )
248
249
249
250
async def revoke_token (
You can’t perform that action at this time.
0 commit comments