mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
feat(auth): centralize token store management and enhance persistence
- Introduced `RegisterTokenStore` and `GetTokenStore` to centralize token store access. - Replaced direct file operations with a unified token persistence API. - Updated all components to use the shared token store for consistent behavior. - Improved logging for token save operations to include file paths.
This commit is contained in:
@@ -99,7 +99,7 @@ func (s *Service) RegisterUsagePlugin(plugin usage.Plugin) {
|
||||
// newDefaultAuthManager creates a default authentication manager with all supported providers.
|
||||
func newDefaultAuthManager() *sdkAuth.Manager {
|
||||
return sdkAuth.NewManager(
|
||||
sdkAuth.NewFileTokenStore(),
|
||||
sdkAuth.GetTokenStore(),
|
||||
sdkAuth.NewGeminiAuthenticator(),
|
||||
sdkAuth.NewCodexAuthenticator(),
|
||||
sdkAuth.NewClaudeAuthenticator(),
|
||||
|
||||
Reference in New Issue
Block a user