revokeOthers method

Future<AuthResponse<void>> revokeOthers()

Revokes all sessions except the current one.

This is useful for signing out of all other devices while keeping the current session active.

Returns an AuthResponse indicating success or failure.

Example:

await authClient.session.revokeOthers();

Implementation

Future<AuthResponse<void>> revokeOthers() async {
  try {
    await _dio.post(ApiEndpoints.revokeOtherSessions);
    return AuthResponse.success(null);
  } on DioException catch (e) {
    return AuthResponse.error(AuthError.fromDio(e));
  }
}