mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage-server
synced 2026-04-12 02:18:18 +00:00
fix: Ozonetel token — 10min cache, invalidate on 401, refresh on login
- Reduced token cache from 55min to 10min (Ozonetel expires in ~15min) - All API methods invalidate cached token on 401 response - Force-refresh token on CC agent login - Removed unused withTokenRetry wrapper Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -139,6 +139,11 @@ export class AuthController {
|
||||
// Lock session in Redis with IP
|
||||
await this.sessionService.lockSession(agentConfig.ozonetelAgentId, memberId, clientIp);
|
||||
|
||||
// Force-refresh Ozonetel API token on login
|
||||
this.ozonetelAgent.refreshToken().catch(err => {
|
||||
this.logger.warn(`Ozonetel token refresh on login failed: ${err.message}`);
|
||||
});
|
||||
|
||||
// Login to Ozonetel with agent-specific credentials
|
||||
const ozAgentPassword = process.env.OZONETEL_AGENT_PASSWORD ?? 'Test123$';
|
||||
this.ozonetelAgent.loginAgent({
|
||||
|
||||
Reference in New Issue
Block a user