aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/core/auth.rs
Commit message (Collapse)AuthorAgeFilesLines
* fix(auth): add token expiry check in start_gameHsiangNianian2026-01-181-1/+0
| | | | | | | | | Check if the Microsoft account token is expired before attempting to launch the game. If expired, attempt to refresh using the refresh_token. If refresh fails, return an error instructing the user to login again. Also removed #[allow(dead_code)] from is_token_expired since it's now actively used.
* fix(auth): prevent infinite recursion in get_client()HsiangNianian2026-01-181-2/+2
| | | | | | | | | | The fallback in the reqwest client builder was calling get_client() recursively, which would cause a stack overflow if Client::builder() failed. Now uses reqwest::Client::new() as the fallback. Also fixed User-Agent to be platform-agnostic. Reviewed-by: Claude Opus 4.5
* feat: integrate AI assistant functionality and configuration managementHsiangNianian2026-01-161-1/+6
| | | | Implemented new commands for managing the AI assistant, including health checks, chat interactions, and model listings for both Ollama and OpenAI. Enhanced the configuration system to support raw JSON editing and added a dedicated AssistantConfig structure for better management of assistant settings. This update significantly improves the user experience by providing comprehensive control over AI interactions and configurations.
* refactor: simplify default implementations for AccountStore and ↵HsiangNianian2026-01-141-3/+3
| | | | MsRefreshTokenState
* refactor: improve code readability by formatting and restructuring function ↵HsiangNianian2026-01-141-13/+17
| | | | calls
* feat: implement Microsoft account token refresh and storage management; add ↵HsiangNianian2026-01-131-0/+83
| | | | Java detection functionality
* feat: enhance Microsoft login flow with status updates and polling managementHsiangNianian2026-01-131-5/+23
|
* refactor: clean up comments and improve code formatting in authentication ↵HsiangNianian2026-01-131-7/+0
| | | | and login UI
* feat: update Microsoft account client ID and enhance login UX with clipboard ↵HsiangNianian2026-01-131-1/+1
| | | | and auto-open functionality
* feat: update Microsoft account client ID for authenticationHsiangNianian2026-01-131-1/+1
|
* feat: implement custom User-Agent client for Microsoft authentication and ↵HsiangNianian2026-01-131-38/+65
| | | | refactor request handling
* feat: update Microsoft account client ID and enhance error handling for ↵HsiangNianian2026-01-131-5/+44
| | | | authentication and profile fetch
* feat: implement Microsoft account login flow and refactor account handlingHsiangNianian2026-01-131-3/+279
|
* feat: add offline account management and version fetching functionalityHsiangNianian2026-01-131-0/+28