removeServerpodCloudAuthData static method
Removes Serverpod Cloud authentication and user data from local storage.
Throws LocalDataStorageException if the file cannot be deleted.
Implementation
static Future<void> removeServerpodCloudAuthData({
required final String localStoragePath,
}) async {
try {
await LocalStorageManager.removeFile(
fileName: ResourceManagerConstants.serverpodCloudAuthFilePath,
localStoragePath: localStoragePath,
);
await LocalStorageManager.removeFile(
fileName: ResourceManagerConstants.serverpodCloudUserFilePath,
localStoragePath: localStoragePath,
);
} on DeleteException catch (e) {
throw LocalDataStorageException(
'Failed to remove serverpod cloud data. error: ${e.error}',
e,
);
}
}