From 4d24fd7eb994ea3e698d796d9c92c6d060d474ea Mon Sep 17 00:00:00 2001 From: Tommy Smith Date: Wed, 25 Jun 2025 16:16:36 +0100 Subject: [PATCH 1/2] `console.warn` in `connectToWeaviateCloud` about auth creds depr --- src/connection/helpers.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/connection/helpers.ts b/src/connection/helpers.ts index 5deb66ab..fea95faa 100644 --- a/src/connection/helpers.ts +++ b/src/connection/helpers.ts @@ -1,6 +1,11 @@ import { WeaviateStartUpError } from '../errors.js'; import { ClientParams, WeaviateClient } from '../index.js'; -import { AuthCredentials } from './auth.js'; +import { + AuthAccessTokenCredentials, + AuthClientCredentials, + AuthCredentials, + AuthUserPasswordCredentials, +} from './auth.js'; import { ProxiesParams, TimeoutParams } from './http.js'; /** The options available to the `weaviate.connectToWeaviateCloud` method. */ @@ -88,6 +93,16 @@ export function connectToWeaviateCloud( const { authCredentials: auth, headers, ...rest } = options || {}; + if ( + [AuthAccessTokenCredentials, AuthClientCredentials, AuthUserPasswordCredentials].some( + (c) => auth instanceof c + ) + ) { + console.warn( + 'Connecting to WCD using OIDC is deprecated and will be removed in August 2025. Please use API keys instead.' + ); + } + return clientMaker({ connectionParams: { http: { From 649bf0d9771da8740dbbf4e6d0cb58977647b087 Mon Sep 17 00:00:00 2001 From: Tommy Smith Date: Wed, 25 Jun 2025 16:18:51 +0100 Subject: [PATCH 2/2] Add `WeaviateCloud` in warning string --- src/connection/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection/helpers.ts b/src/connection/helpers.ts index fea95faa..28a0a959 100644 --- a/src/connection/helpers.ts +++ b/src/connection/helpers.ts @@ -99,7 +99,7 @@ export function connectToWeaviateCloud( ) ) { console.warn( - 'Connecting to WCD using OIDC is deprecated and will be removed in August 2025. Please use API keys instead.' + 'Connecting to Weaviate Cloud (WCD) using OIDC is deprecated and will be removed in August 2025. Please use API keys instead.' ); }