Spaces:
Sleeping
Sleeping
Yorrick Jansen
commited on
Commit
·
d3e23df
1
Parent(s):
56710bf
Ruff format
Browse files- strava_mcp/auth.py +2 -2
strava_mcp/auth.py
CHANGED
|
@@ -78,7 +78,7 @@ class StravaAuthenticator:
|
|
| 78 |
self.token_future.set_result(token_data.refresh_token)
|
| 79 |
|
| 80 |
return HTMLResponse(
|
| 81 |
-
"<h1>Authorization successful!</h1
|
| 82 |
)
|
| 83 |
except Exception as e:
|
| 84 |
logger.exception("Error during token exchange")
|
|
@@ -87,7 +87,7 @@ class StravaAuthenticator:
|
|
| 87 |
if self.token_future and not self.token_future.done():
|
| 88 |
self.token_future.set_exception(e)
|
| 89 |
|
| 90 |
-
return HTMLResponse("<h1>Authorization failed!</h1
|
| 91 |
|
| 92 |
async def _exchange_code_for_token(self, code: str) -> TokenResponse:
|
| 93 |
"""Exchange the authorization code for tokens.
|
|
|
|
| 78 |
self.token_future.set_result(token_data.refresh_token)
|
| 79 |
|
| 80 |
return HTMLResponse(
|
| 81 |
+
"<h1>Authorization successful!</h1><p>You can close this tab and return to the application.</p>"
|
| 82 |
)
|
| 83 |
except Exception as e:
|
| 84 |
logger.exception("Error during token exchange")
|
|
|
|
| 87 |
if self.token_future and not self.token_future.done():
|
| 88 |
self.token_future.set_exception(e)
|
| 89 |
|
| 90 |
+
return HTMLResponse("<h1>Authorization failed!</h1><p>An error occurred. Please check the logs.</p>")
|
| 91 |
|
| 92 |
async def _exchange_code_for_token(self, code: str) -> TokenResponse:
|
| 93 |
"""Exchange the authorization code for tokens.
|