feat: enable automatic auth credential updates by default and improve auth handling#23
Merged
feat: enable automatic auth credential updates by default and improve auth handling#23
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request enables automatic authentication credential updates by default and adds logic to save the current account's authentication state before switching to a different account. The changes improve auth handling by making credential persistence more robust and reducing the risk of losing session data during account switches.
Changes:
- Changed default value of
ENABLE_AUTH_UPDATEfromfalsetotrueand modified environment variable parsing to use opt-out logic - Added automatic auth state saving before account switches in
BrowserManager - Updated JSDoc return type annotation for
translateOpenAIToGoogleto reflect its async nature
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/ConfigLoader.js | Changed default for enableAuthUpdate to true and modified environment variable parsing to treat anything other than "false" as enabled |
| src/core/BrowserManager.js | Added logic to save current auth state before switching accounts; improved condition check for periodic auth updates |
| src/core/FormatConverter.js | Updated JSDoc to indicate method returns a Promise |
| README.md | Updated documentation to reflect new default behavior for ENABLE_AUTH_UPDATE |
| README_EN.md | Updated documentation to reflect new default behavior for ENABLE_AUTH_UPDATE |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
中文
ENABLE_AUTH_UPDATE环境变量默认值设为true。English
ENABLE_AUTH_UPDATEdefault totrue.front pr #21