Add token refresh functionality and improve token extraction

- Introduced a new `get_user_token.py` file to handle token refresh logic using the Chinese server API.
- Updated `config.py` to include new token settings for refresh server URL and enable refresh option.
- Refactored `oauth_auth.py` to utilize the new token extraction method, enhancing error handling and user feedback.
- Added localization strings for token refresh messages in both English and Chinese to improve user experience.
This commit is contained in:
yeongpin
2025-04-12 17:28:11 +08:00
parent 26a8e8da28
commit f667da64b3
5 changed files with 145 additions and 20 deletions

View File

@@ -102,6 +102,10 @@ def setup_config(translator=None):
'show_selection_alert': False, # 默认不显示选择提示弹窗
'timeout': 120,
'max_attempts': 3
},
'Token': {
'refresh_server': 'https://token.cursorpro.com.cn',
'enable_refresh': True
}
}