fix: 修复Oauth账号自动刷新token失败的bug

This commit is contained in:
shaw
2025-12-20 13:01:58 +08:00
parent bb500b7b2a
commit adebd941e1
8 changed files with 333 additions and 99 deletions

View File

@@ -33,6 +33,17 @@ func ProvideEmailQueueService(emailService *EmailService) *EmailQueueService {
return NewEmailQueueService(emailService, 3)
}
// ProvideTokenRefreshService creates and starts TokenRefreshService
func ProvideTokenRefreshService(
accountRepo ports.AccountRepository,
oauthService *OAuthService,
cfg *config.Config,
) *TokenRefreshService {
svc := NewTokenRefreshService(accountRepo, oauthService, cfg)
svc.Start()
return svc
}
// ProviderSet is the Wire provider set for all services
var ProviderSet = wire.NewSet(
// Core services
@@ -61,6 +72,7 @@ var ProviderSet = wire.NewSet(
NewConcurrencyService,
NewIdentityService,
ProvideUpdateService,
ProvideTokenRefreshService,
// Provide the Services container struct
wire.Struct(new(Services), "*"),