logout static method
Implementation
static Future<Map<String, Object?>> logout(
final Client cloudApiClient, {
required final String localStoragePath,
required final List<String> tokenIds,
required final bool all,
}) async {
final currentSessionLoggedOut = await _logoutDevices(
cloudApiClient,
tokenIds,
all,
);
if (currentSessionLoggedOut) {
try {
await ResourceManager.removeServerpodCloudAuthData(
localStoragePath: localStoragePath,
);
} on Exception catch (e, s) {
throw FailureException.nested(
e,
s,
'Failed to remove stored credentials',
'Please remove these manually. '
'They should be located in $localStoragePath.',
);
}
}
return {'currentSessionLoggedOut': currentSessionLoggedOut};
}