addAuthInterceptor method
void
addAuthInterceptor(
- Interceptor authInterceptor
Add auth interceptor for automatic token refresh This should be called after AuthService is initialized to avoid circular dependency
Implementation
void addAuthInterceptor(Interceptor authInterceptor) {
if (!_authInterceptorAdded) {
// Add auth interceptor at the beginning (before error handler)
_dio.interceptors.insert(0, authInterceptor);
_authInterceptorAdded = true;
_logger.i('🔐 Auth interceptor added for automatic token refresh');
}
}