Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
fac19d25
Commit
fac19d25
authored
Jan 04, 2026
by
shaw
Browse files
fix(oauth): 修复claude cookie添加账号时会话混淆的问题
parent
70e9329e
Changes
2
Hide whitespace changes
Inline
Side-by-side
backend/internal/repository/claude_oauth_service.go
View file @
fac19d25
...
@@ -233,11 +233,17 @@ func (s *claudeOAuthService) RefreshToken(ctx context.Context, refreshToken, pro
...
@@ -233,11 +233,17 @@ func (s *claudeOAuthService) RefreshToken(ctx context.Context, refreshToken, pro
}
}
func
createReqClient
(
proxyURL
string
)
*
req
.
Client
{
func
createReqClient
(
proxyURL
string
)
*
req
.
Client
{
return
getSharedReqClient
(
reqClientOptions
{
// 禁用 CookieJar,确保每次授权都是干净的会话
ProxyURL
:
proxyURL
,
client
:=
req
.
C
()
.
Timeout
:
60
*
time
.
Second
,
SetTimeout
(
60
*
time
.
Second
)
.
Impersonate
:
true
,
ImpersonateChrome
()
.
})
SetCookieJar
(
nil
)
// 禁用 CookieJar
if
strings
.
TrimSpace
(
proxyURL
)
!=
""
{
client
.
SetProxyURL
(
strings
.
TrimSpace
(
proxyURL
))
}
return
client
}
}
func
prefix
(
s
string
,
n
int
)
string
{
func
prefix
(
s
string
,
n
int
)
string
{
...
...
backend/internal/service/account_usage_service.go
View file @
fac19d25
...
@@ -76,7 +76,7 @@ type antigravityUsageCache struct {
...
@@ -76,7 +76,7 @@ type antigravityUsageCache struct {
}
}
const
(
const
(
apiCacheTTL
=
10
*
time
.
Minute
apiCacheTTL
=
3
*
time
.
Minute
windowStatsCacheTTL
=
1
*
time
.
Minute
windowStatsCacheTTL
=
1
*
time
.
Minute
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment