Skip to content

Commit

Permalink
Fix API key again (#6390)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbren authored Jan 21, 2025
1 parent 25fdb0c commit 8ae3648
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openhands/server/listen_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ async def connect(connection_id: str, environ, auth):
if not signed_token:
logger.error('No github_auth cookie')
raise ConnectionRefusedError('No github_auth cookie')
decoded = jwt.decode(signed_token, config.jwt_secret, algorithms=['HS256'])
if not config.jwt_secret:
raise RuntimeError('JWT secret not found')
decoded = jwt.decode(
signed_token, config.jwt_secret.get_secret_value(), algorithms=['HS256']
)
user_id = decoded['github_user_id']

logger.info(f'User {user_id} is connecting to conversation {conversation_id}')
Expand Down

0 comments on commit 8ae3648

Please sign in to comment.