add refresh token
This commit is contained in:
@@ -7,10 +7,12 @@ part 'core_providers.g.dart';
|
||||
/// Provider for DioClient (singleton)
|
||||
///
|
||||
/// This is the global HTTP client used across the entire app.
|
||||
/// It's configured with interceptors, timeout settings, and auth token injection.
|
||||
/// It's configured with interceptors, timeout settings, auth token injection,
|
||||
/// and automatic token refresh on 401 errors.
|
||||
@Riverpod(keepAlive: true)
|
||||
DioClient dioClient(Ref ref) {
|
||||
return DioClient();
|
||||
final storage = ref.watch(secureStorageProvider);
|
||||
return DioClient(secureStorage: storage);
|
||||
}
|
||||
|
||||
/// Provider for SecureStorage (singleton)
|
||||
|
||||
Reference in New Issue
Block a user