Skip to content

Commit 4d24fd7

Browse files
committed
console.warn in connectToWeaviateCloud about auth creds depr
1 parent bba1c5e commit 4d24fd7

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/connection/helpers.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { WeaviateStartUpError } from '../errors.js';
22
import { ClientParams, WeaviateClient } from '../index.js';
3-
import { AuthCredentials } from './auth.js';
3+
import {
4+
AuthAccessTokenCredentials,
5+
AuthClientCredentials,
6+
AuthCredentials,
7+
AuthUserPasswordCredentials,
8+
} from './auth.js';
49
import { ProxiesParams, TimeoutParams } from './http.js';
510

611
/** The options available to the `weaviate.connectToWeaviateCloud` method. */
@@ -88,6 +93,16 @@ export function connectToWeaviateCloud(
8893

8994
const { authCredentials: auth, headers, ...rest } = options || {};
9095

96+
if (
97+
[AuthAccessTokenCredentials, AuthClientCredentials, AuthUserPasswordCredentials].some(
98+
(c) => auth instanceof c
99+
)
100+
) {
101+
console.warn(
102+
'Connecting to WCD using OIDC is deprecated and will be removed in August 2025. Please use API keys instead.'
103+
);
104+
}
105+
91106
return clientMaker({
92107
connectionParams: {
93108
http: {

0 commit comments

Comments
 (0)