read method

  1. @override
Future<AuthTokenModel?> read()
override

Retrieves the stored authentication tokens from secure storage.

Returns the AuthTokenModel if valid tokens are present, or null if no tokens are stored, the stored data is corrupted, or storage access fails.

Called by Fresh Dio on Dio client initialisation, before determining whether a token refresh is needed, and when recovering from network failures.

Implementation

@override
Future<AuthTokenModel?> read() async {
  return SecureStorage.instance.getAuthTokenModel();
}